-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pagination control not re-rendering when "currentPage" is updated in state #663
Comments
What's pagination control? :) We have no React controls in PnPjs. |
I am terribly sorry, I meant to post this to pnp/sp-dev-fx-controls-react. |
No problem. I actually could transfer the issue. |
Thanks! that would be great! |
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible. |
Hi, did you solve this somehow? Thanks. |
Category
Version
Please specify what version of the library you are using: [ 1.20.0 ]
Please specify what version(s) of SharePoint you are targeting: [ 16.0.0.20405 ]
Expected / Desired Behavior / Question
Updating the state value for "currentPage" should cause the Pagination component to re-render.
<Pagination
currentPage={this.state.currentPage}
totalPages={this.state.totalPages}
onChange={(page) => this._getPage(page, numItems)}
/>
Observed Behavior
When updating the search query via the web part property pane and triggering componentDidUpdate() to call setState({ currentPage: this.state.currentPage } does not re-render the Pagination component with the new value for currentPage.
Steps to Reproduce
I can force the state value for currentPage to 1 within componentDidUpdate() and the Pagination component will not re-render
The text was updated successfully, but these errors were encountered: