infinite query with pagination #6786
Unanswered
IlyaShorin
asked this question in
Q&A
Replies: 1 comment 2 replies
-
i don't think you want an infinite query here, but just a regular useQuery ? |
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.
-
Hello!
I'm using v4
i have struggled with this task, maybe someone can help me, explaining how i can achieve required behavior.
I have a page with an issue history, this page should have page-by-page pagination according to the backend contract.
I receive a response in the form of
{ data: [{}], pagination: { total: number, limit: number, page: number } }
, and i store current page in query paramsCurrently, the page has a “show more” button, clicking on which uses useInfiniteQuery to request the next page of data. However, this way, the pagination component’s numbers do not change, and if you click on them, no data request is made.
But I need to achieve the following behavior:
Maybe someone has implemented something similar and can advise me? Maybe useInfinteQuery is not something that i need?
Beta Was this translation helpful? Give feedback.
All reactions