-
Notifications
You must be signed in to change notification settings - Fork 625
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
Force new current page as property #9
Comments
I understand. Thank you for your PR ;) |
Hello Travis , sorry to bother you. I'm trying out your solution with ReactDOM.unmountComponentAtNode(document.getElementById('react-paginate')); |
This approach seemed to work for me when needing to update the selected page based on a prop condition
|
works for me |
I understand that when the component mounts, I can pass initialPage as a property. After that, the current page is determined by internal state. For me, the problem is that I want to reset the current page from the parent (as a property).
My use case is paginated search results, and I want to always be on the first page after a new search. Right now, it seems I can only do this by unmounting the paginate component, and passing a new initialPage.
The solution, for me, would be to have an optional currentPage property, which, if absent, would defer to existing behavior.
The text was updated successfully, but these errors were encountered: