-
-
Notifications
You must be signed in to change notification settings - Fork 319
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
Large set of data not fully rendered #460
Comments
The react-virtualized library works around this issue by scaling the the scroll position it sets for a row based on the ratio of "max CSS height allowed by browser" to "computed height of all rows" if the latter is greater than the former: https://github.com/bvaughn/react-virtualized/blob/master/source/Grid/utils/ScalingCellSizeAndPositionManager.js |
We are also facing the same issue in our application where we are using react-virtual to render millions of rows. We have implemented a jump scroll approach which allows us to drag the scroll to any position and render the corresponding records. Essentially when we drag it to the end it just renders the rows based on the This stops us from rendering the whole report. It will really help if this issue is Prioritized to be fixed in the library to scale the scrollPosition / Offset. |
Would love to see some links and prior art on this topic. |
Is this not enough? https://github.com/bvaughn/react-virtualized/blob/master/source/Grid/utils/ScalingCellSizeAndPositionManager.js If the total height of all the rows is greater than the maximum allowed by the browser (this is different per browser, but a single default value of 1,500,000px can safely be used) then the scroll position needs to be a percentage of that max height, not the total height of all the rows. |
Fast grid (https://github.com/gabrielpetersson/fast-grid) seems to handle many millions of rows. |
Describe the bug
When trying to render a large list of items (1 million row for example) then scroll to the last item in the list, only 958.697 rows are rendered when the row height is equal to 35, if we set the row height to 50, then only 671.088 rows are rendered.
I think that this issue is related to a browser limitation (see https://stackoverflow.com/questions/16637530/whats-the-maximum-pixel-value-of-css-width-and-height-properties), still i noticed that libraries like react-virtualized doesn't have this issue, so i believe that there must be a way to fix it. May i get any more clarifications or ways to fix it? Thanks.
Your minimal, reproducible example
https://codesandbox.io/s/practical-ives-holiyy?file=/src/main.tsx
Steps to reproduce
Expected behavior
The last element should be 999.999 (since the rows index starts from 0).
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
Ubuntu 22.04, Chrome latest
tanstack-virtual version
V3.0.0-beta32
TypeScript version
No response
Additional context
No response
Terms & Code of Conduct
The text was updated successfully, but these errors were encountered: