Replies: 2 comments
-
hmm, I'd need to see that in a reproduction please. It could be that |
Beta Was this translation helpful? Give feedback.
-
Should have clarified that more, the three example requests don't get called immediately after the previous request has been send. But the token get's somehow persisted, so when scrolling down once, A better representation would probably be // User scrolls down
GET /endpoint?token=test-123 HTTP/1.1
// User scrolls down again
GET /endpoint?token=test-123 HTTP/1.1
// User scrolls down again
GET /endpoint?token=test-123 HTTP/1.1 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I've build a DataGrid using MUI-X DataGrid Pro. To fetch data, I use TanStack query.
I'm fetching data using the following
useInfiniteQuery
hook:To trigger fetching a new page, I use the following function which I passed as a prop the datagrid:
When approaching the end of the DataGrid,
handleOnRowsScrollEnd()
does get called and thenextPageParam
(a pagination token) gets appended to the query url. Assuming a possible paginationToken would betest-123
the network tab (devtools) shows the following requests:This results in the datagrid showing the same data three times.
Am I missing something here or why does the
nextPageParam
(pagination token) not update accordingly?Beta Was this translation helpful? Give feedback.
All reactions