Skip to content
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

Closed
1 of 4 tasks
voltmer1 opened this issue Sep 11, 2020 · 6 comments
Closed
1 of 4 tasks
Labels
status:fixed-next-drop Issue will be fixed in upcoming release. type:bug
Milestone

Comments

@voltmer1
Copy link

Category

  • Enhancement
  • Bug
  • Question
  • Documentation gap/issue

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

@koltyakov
Copy link
Member

What's pagination control? :) We have no React controls in PnPjs.

@voltmer1
Copy link
Author

I am terribly sorry, I meant to post this to pnp/sp-dev-fx-controls-react.

@koltyakov
Copy link
Member

No problem. I actually could transfer the issue.

@voltmer1
Copy link
Author

Thanks! that would be great!

@koltyakov koltyakov reopened this Sep 11, 2020
@koltyakov koltyakov transferred this issue from pnp/pnpjs Sep 11, 2020
@ghost
Copy link

ghost commented Sep 11, 2020

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@ghost ghost added the Needs: Triage 🔍 label Sep 11, 2020
AJIXuMuK added a commit that referenced this issue Sep 19, 2020
@AJIXuMuK AJIXuMuK added status:fixed-next-drop Issue will be fixed in upcoming release. type:bug and removed Needs: Triage 🔍 labels Sep 19, 2020
@AJIXuMuK AJIXuMuK added this to the 2.0.0 milestone Sep 19, 2020
@jburagev
Copy link

Category

  • Enhancement
  • Bug
  • Question
  • Documentation gap/issue

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

Hi, did you solve this somehow? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:fixed-next-drop Issue will be fixed in upcoming release. type:bug
Projects
None yet
Development

No branches or pull requests

4 participants