Replies: 1 comment 1 reply
-
It seems that the scroll position maintainer doesn't support adding item to(or removing item from) upper middle of the list. I felt it's a similar problem to #284. And this problem might be solvable with comparing React keys. I'll take a time to research it's possible or not. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey @inokawa
I have been trying to look into a unique case with virtualized lists that i haven't seen it handled in any library. Basically I have an array of elements that elements might be added or removed for any position in the array. The issue i have seen in every virtualized list is that the scroll position is not maintained
Partially virtua handles it when adding/removing elements on top or bottom of list using the shift property https://github.com/inokawa/virtua/blob/main/src/core/cache.ts#L177.
But in my case the elements might be removed on any index in the array i made a small demo of my case here https://github.com/ekm1/virtua
is it something we can look into supporting? I know it might be a bit slower as we would need to detect which elements of the array were removed and calculate based on the specific sizes in the cache for the indexes we have in memory.
I am opening a discussion to maybe pick your mind in it and see your opinion.
Beta Was this translation helpful? Give feedback.
All reactions