-
Notifications
You must be signed in to change notification settings - Fork 624
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
Change page programmatically #86
Comments
Hi @phaeton2040, <ReactPaginate clickCallback={this.handlePageClick}
pageNum={this.state.pageNum}
forceSelected={4} /> |
@AdeleD , thnx for the answer. Actually it is already done. But it didn't work because I used version 1.0 where there was no 'shouldComponentUpdate' and because of this setting 'forceSelected' property had no effect on updates. I upgraded to 2.0 and now it works fine! Issue may be closed |
Hello , |
Hi @AdeleD , Running into some problems trying to mess with the forceSelected prop. I don't entirely understand it. This is my approach right now.
Unfortunately this isn't working for me. What can I do to force the selected page in the parent component? |
Any implementation for this? |
This is an issue if using react-router. If you So |
@petertdinh did you ever find a solution or workaround for forcing the page to update within the component? |
For some reason every number but 0 works for the forcePage property. Is it just me or is this a bug? |
I need to change page programmatically without clicking on certain page label:
Here user will input a page number, press enter and go to it. But if I enter a page number it is not stored in component's variable 'selected', so if I click on next arrow component goes to 2nd page not 6th (see image). That happens because 'clickCallback' is invoked directly in my component. Is there a way to update currently selected page from outside code?
The text was updated successfully, but these errors were encountered: