Replies: 1 comment 2 replies
-
could be a bug in My other question would be why you would need |
Beta Was this translation helpful? Give feedback.
2 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.
-
Hey guys I'm having a problem with re fetching infinite data. I have implemented infinite loading for a table I use in my app to fetch next pages and this works great.
So i call the hook like this:
I call this with these settings:
Now when calling
refetch
the default page number set in thequeryFn
method (1) is sent for all 3 requests when for example i have 3 pages loaded it calls the back end like this:When I call get next page I pass the
pageParam
value. This is not the case with refetch so thepageParam
value defaults to 1.I'm kinda unsure how refetching works but i figured it should use the
getPreviousPageParam
function that I passed. The API is all ways called the right amount of times but I'm wondering if and how I should maintain what page is current in my state and somehow pass it? Any help is greatly appreciated.Beta Was this translation helpful? Give feedback.
All reactions