You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Through app we use both client and server side pagination. In all cases we are required to update URL params to reflect pagination (page, page size, sort applied, etc.). Because of this on client side pagination I provide custom "onPaginationChange" which includes URL update method
When implementing table, I encountered behavior where "onPaginationChange":
Is fired even when sorting is applied
When fired, always returns pageIndex 0, even if initial value was any other value
Possible bug: "onPaginationChange" returns incorrect prevState when used in "client" mode?
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
going directly to any other page, and clicking "Next", in console.log you can see it returns pageIndex 0
If you change mode to "server" everything works as expected
Do you intend to try to help solve this bug with your own PR?
None
Terms & Code of Conduct
I agree to follow this project's Code of Conduct
I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
The text was updated successfully, but these errors were encountered:
TanStack Table version
"@tanstack/react-table": "^8.21.2"
Framework/Library version
"react": "^18.3.1"
Describe the bug and the steps to reproduce it
Hey,
Through app we use both client and server side pagination. In all cases we are required to update URL params to reflect pagination (page, page size, sort applied, etc.). Because of this on client side pagination I provide custom "onPaginationChange" which includes URL update method
When implementing table, I encountered behavior where "onPaginationChange":
Possible bug: "onPaginationChange" returns incorrect prevState when used in "client" mode?
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
https://codesandbox.io/p/sandbox/k3dnff
Screenshots or Videos (Optional)
going directly to any other page, and clicking "Next", in console.log you can see it returns pageIndex 0
If you change mode to "server" everything works as expected
Do you intend to try to help solve this bug with your own PR?
None
Terms & Code of Conduct
The text was updated successfully, but these errors were encountered: