PageIndex does not update in controlled component
rc-v16
##Describe the bug Not sure if this is a bug or whether I have to control page index manually since its a fully controlled component, but triggering a global search or column filter returns results but does not reset page index leading to incorrect pagination behaviour
##To Reproduce Browse to https://codesandbox.io/s/elegant-cherry-fbrei Progress to page 2 Type some text from page 2 in global search input or column filter Pagination says Page 2 of 1
##Expected behavior Page should reset to 1 and pagination should say Page 1 of 2
##Codesandbox! https://codesandbox.io/s/elegant-cherry-fbrei
##Desktop OS: OS 10.14 Browser Latest Chrome Version 81
See https://github.com/tannerlinsley/react-table/issues/1883
Issue is still present in version 7.0.0-rc.16
Fixed in bfcc08e7eb66d0bb86bbda0d3f40cf2319e304b3
@tannerlinsley I have a similar kind of issue, i have implemented redux to store the pageIndex value as i am using multiple instances of react table, as i want to maintain state for each react table. When i click on next page i dispatch an action to store the pageIndex value in reducer. When i navigate to second page and if i apply global filter then the pageCount shows 2 of 1. The pageIndex is set to 1, and doesn't update on filtering the values.
codesandbox - https://codesandbox.io/s/relaxed-chebyshev-4r3up?file=/src/App.js
react-table version : 7.7.0 Thanks!
I still have this issue with react-table v7.7.0 when using manualPagination with server-side data fetch.
If I have multiple pages of data, I go to page 3 for example, then search for something, and get only one row as a result, pageIndex is not updated, pageIndex is still = 2, expecting it to update pageIndex to 0. I have to manually gotoPage(0) when searching. Anything I am missing?
@sergecheban autoResetPage: false option should help here.
Does not seem to help, but I think that might be the desired behavior when using manualPagination for most people.
this is still an issue