Replies: 1 comment 2 replies
-
hmm, @spandzgit you can manually update Doing this to to sync scroll in prepend infinite scroll to sync scroll https://codesandbox.io/s/beautiful-meninsky-fr6csu?file=/pages/index.js |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are using react-virtual for implementing an infinite scroll of large set of records ( in millions ). We have implemented the next set of records fetch based on the scrollPosition and mapping of that to the set of records we fetch. Which works great as we scroll incrementally and also jump scroll to a particular position.
Except when we drag the mouse to the end of the scroll and trying to load the last set of records - works fine if its below the limit of the max possible pixel allowed by browser. For large reports like
5000010
the scroll position stops at the max the browser allows and hence the visible set of records for the virtualizer also stops at that number838890
.To fix this we are figured out if we use a
factor
to the scrollPosition and multiply it with the lastScrollPosition received we are able to fetch the last set of records which isrecord=5000001&limit=500
. The virtualizer updates the totalElements and also the elements with the updated 5000001 set of records but therange
still stays same around that number838890
.Is there a way to send that Factor to the virtualizer on scroll to update the
scrollOffset
so that the range updates and the virtualizer shows the last set of records 5000001...Beta Was this translation helpful? Give feedback.
All reactions