React query useInfiniteQuery (v3) and react table (v7) for server side pagination
Anyone has every connected react-query v3 with react-table v7 ? Im trying to implement a server side paginator with infinite scrolling doing:
And everything seems ok if I implement custom button paginators like:
but have weird behavior on the custom table paginator that react-table renders:
5 Replies
There is an example on tanstack/table that might be useful to you https://tanstack.com/table/latest/docs/framework/react/examples/virtualized-infinite-scrolling
React Table Virtualized Infinite Scrolling Example | TanStack Table...
An example showing how to implement Virtualized Infinite Scrolling in React Table
Im using v7 but I see there is something like a prepareRow thing, so I wouldn't need to use useInfiniteQuery ? My head
I think one of my problems is not being able to get the entire length of teh object if im calling it straight with limit and offser
I should probably slice it like in the example you provided. I need a break tbh
@dan https://stackoverflow.com/questions/78111466/implement-server-side-pagination-with-react-query-v3-and-react-table-v7
I posted here if you wanna take a look. I think I dont need useInfiniteQuery and what is happening now is that the built in pagination only shows when I manually change the state.
The state paginator was built just for testing purposes, still unsure why the built in paginator doesn't show on page load.
I feel I'm doing two different things here
Stack Overflow
Implement server side pagination with react query v3 and react tabl...
Im trying to implement server side pagination using react query at v3 and react table at v7. Im trying some things and created a custom paginator because I want not seeing the virtual paginator fro...
And both the wrong way
im really blind on this