Need to reset the page Index in table's state when search occurs #2864
Answered
by
umarluqman
Waqqars987
asked this question in
Q&A
-
Hi, I have a requirement where I need to reset the page Index in the table's state to 0 whenever a search happens. I am using manual server sided pagination. |
Beta Was this translation helpful? Give feedback.
Answered by
umarluqman
Nov 30, 2020
Replies: 1 comment
-
You can take a look at this Basically, it uses the global states (page index from an API) instead of the table local state when the user is not using the built-in pagination function. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Waqqars987
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can take a look at this
https://codesandbox.io/s/react-table-with-global-states-pagination-index-ny4kj?file=/src/Listing.js:4367-4454
Basically, it uses the global states (page index from an API) instead of the table local state when the user is not using the built-in pagination function.