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
Describe the bug
There are some cases when scroll position of reversed list doesn't stay at the bottom
When some part of content is loaded with a delay after initial render (a picture in my example). You can also click "Add item" button in the attached codesandbox example to reproduce it.
Randomly happens when you expand and collapse items, not in 100% cases
Scroll up just a bit > collapse one item, so that scroll position is at the bottom again > expand the item => scroll position is not at the bottom, but at the same place as before item collapsing.
In my case also, after the images load in the chat, the scroll position doesn't stay at the bottom. I tried to forcefully scroll at the bottom in "onLoad" callbacks of the images using scrollToIndex(lastIndex) but for that also, I have to put in checks whether the scroll is near "atBottom" or whether it is the last message with an image etc. - which might not generate accurate results.
"onResize" prop would be an ideal solution but we have to push this soon for performance improvements, so not much time in hand 😞
Describe the bug
There are some cases when scroll position of reversed list doesn't stay at the bottom
screencast-codesandbox.io-2024.03.11-20_36_38.webm
To Reproduce
Codesandbox: https://codesandbox.io/p/sandbox/virtua-reverse-infinite-scroll-forked-hn39kp
Expected behavior
Scroll position should stay at the bottom on any items resize when
reverse: true
Platform:
Additional context
Might be related to #301, but seems more like a different issue
The text was updated successfully, but these errors were encountered: