Replies: 1 comment
-
I see now this doesn't work. |
Beta Was this translation helpful? Give feedback.
0 replies
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've really been loving Redux Toolkit, and now I'm using infinite queries for the first time. The data is shown in a table, one page at a time. The table has the standard previous/next page buttons as well as the list of pages (1, 2, 3, .....8, 9, 10) at the bottom.
My question is what the best way to let the user jump to a specific page is. There is no endpoint for that function.
But it looks like I should be able to hold a page number as state in my component and then pass it in the
initialPageParam
to the hook. As long as the user is paging forward/backward it shouldn't matter, it would only need to be updated if they actually tried to jump directly to a specific page.Would that be the best way to approach this?
Beta Was this translation helpful? Give feedback.
All reactions