Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supports Infinite query data of tanstack query in Infinitescroll component #353

Open
shawnzhu opened this issue Jul 28, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@shawnzhu
Copy link
Member

Now

it only supports a flat array items in the <InfiniteScroll /> component.

Expected result

Supports InfiniteData type from @tanstack/react-query to reduce developer's effort to transform paged data into a flat array

@shawnzhu shawnzhu added the enhancement New feature or request label Jul 28, 2023
@shawnzhu
Copy link
Member Author

The key thing I've learned from the TanStack table virtualized infinite scrolling example is it uses React.useMemo hook to keep a flat array of arrays from the useInfiniteQuery hook so that it could be used in TanStack table (or the InfiniteScroll component). see https://github.com/TanStack/table/blob/ac48ff768a44d0c379b5f36d98e5f90e8018e1b7/examples/react/virtualized-infinite-scrolling/src/main.tsx#L80-L100

So I think the result of this issue is contributing a new story on how to use useInfiniteQuery with <Infinitescroll />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant