You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Scroll to the last element in the virtualized list
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
I agree to follow this project's Code of Conduct
I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
Reacted by Omar Lahia, Spandan Chatterjee, Mohamed, Jin Yao, Gaspar Dip, Dmitriy Chernukho, Lilian Prus, Damian Olszewski and Enable-Lukas
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 max-scroll-position max-limit of the browser instead of the max lines available in the report.
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.
Reacted by AXeL, Mohamed, Jin Yao, Djaka Pradana Jaya Priambudi, Sveta Slepner and Jacqueline Gutman
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.
Consolidating: this is the browser's maximum element height limit, also tracked in #616, where #1172 proposes built-in scroll scaling. Closing in favour of #616 so the discussion stays in one place.
Activity
jcready commentedon Jan 1, 2023
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
spandzgit commentedon Jan 26, 2023
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
max-scroll-positionmax-limit of the browser instead of the max lines available in the report.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.
tannerlinsley commentedon Aug 29, 2023
Would love to see some links and prior art on this topic.
jcready commentedon Jan 15, 2024
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.
joodaloop commentedon Mar 11, 2024
Fast grid (https://github.com/gabrielpetersson/fast-grid) seems to handle many millions of rows.
piecyk commentedon Oct 14, 2026
Consolidating: this is the browser's maximum element height limit, also tracked in #616, where #1172 proposes built-in scroll scaling. Closing in favour of #616 so the discussion stays in one place.