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

Infinite Scrolling - Infinite Loop of loading and stop scrolling after set maxPages in useInfiniteQuery #1111

Closed
1 task done
lod911 opened this issue Apr 19, 2024 · 2 comments

Comments

@lod911
Copy link

lod911 commented Apr 19, 2024

material-react-table version

v2.13.0

react & react-dom versions

v18.2.0

Describe the bug and the steps to reproduce it

Hello

Because I have a lot of Data (>100'000 rows) I started implementing the infinite scrolling.

After Adding the Parameter
maxPages
to the useInfiniteQuery, the data keeps loading but only the size * maxPages gets loaded and displayed. Not more. When you scroll up, the loading stops.

I think its not related to MRT and not to TanStack Query. The query does, what its should do

Can anybody please help?

Regards

Minimal, Reproducible Example - (Optional, but Recommended)

open

add new Line with the Parameter
maxPages: 4

image

run and scroll down in the table. When you reach 100 Fetches, the issue starts.

Screenshots or Videos (Optional)

Bildschirmaufzeichnung.vom.20.04.2024.00.12.41.webm

Do you intend to try to help solve this bug with your own PR?

No, because I do not know how

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
crypticbeing added a commit to crypticbeing/material-react-table that referenced this issue Apr 23, 2024
@lod911
Copy link
Author

lod911 commented May 1, 2024

Yes, commit 400907c did it. Thank you!

@KevinVandy
Copy link
Owner

This is not a bug with MRT at all, but a bug with how you were trying to use react-query. See #1116 if you want a solution.

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

No branches or pull requests

2 participants