Describe the bug#
Hello, Im running into a issue with the autoResetPageIndex showing/processing the incorrect page Index when using client side pagination and changing the rows per page.
Your minimal, reproducible example#
https://stackblitz.com/edit/tanstack-table-csasqf?file=src%2Fmain.tsx
Steps to reproduce#
- Click next page 2 times so you see
Page 3 of 10,000
- Click the rows per page option
- Select option
show 20
You will now see the incorrect number Page 2 of 5,000
Expected behavior#
- Click next page 2 times so you see
Page 3 of 10,000
- Click the rows per page option
- Select option
show 20
You should now see Page 1 of 5,000
How often does this bug happen?#
Every time
Screenshots or Videos#
https://github.com/TanStack/query/assets/35247622/969eb333-4b99-499a-85b9-4b9415224ca9
Platform#
- macOS 14.4.1
- Chrome 123.0.6312.87 (Official Build) (x86_64)
Tanstack Query adapter#
react-query
TanStack Query version#
8.15.0
TypeScript version#
5.1.6
Additional context#
No response
Current work around