How to maintain scroll position when underlying data changes? #880
Unanswered
clintharris
asked this question in
Q&A
Replies: 2 comments
-
Same problem here |
Beta Was this translation helpful? Give feedback.
0 replies
-
firstItemIndex |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What's the best way to maintain the current scroll position of the list when the underlying
data
array changes (assuming the currently visible items are still available in both the "old" and "new" data arrays)?I'm using
<Virtuoso>
to render a list in which the arraydata
changes when the user scrolls to certain positions in the list. In other words, the current implementation is trying to use pagination in which only a single page of data is loaded at a time--and that page changes as you scroll (vs. using virtuoso's "load more" or "prepend" handlers to add more items to thedata
array that keeps growing).Is there a
Virtuoso
property I can use to maintain the list position betweendata
array changes?Beta Was this translation helpful? Give feedback.
All reactions