Pagination and invalidating query data #5659
Unanswered
UltimateGG
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a table, similar to this:

The data for the table is from a react query call.
When you click the isAdmin switch it does a mutation, and when that finishes it invalidates the query. This causes the table to go back to page 1, since data changed.
I tried using
autoResetPageIndex: false
, but that breaks the normal functionality of when filtering or sorting setting the page back to 1.Ideally: #5207
How can I get the best of both worlds? What's the best pattern for this?
Beta Was this translation helpful? Give feedback.
All reactions