Closed ZowieTao closed 3 months ago
The example you've posted does not implement prepending correctly; it's not your fault really, prop-based prepending mechanism is fairly convoluted. If you're going to build a reverse scrolling I strongly recommend the MessageList. It handles data prepend much better.
https://virtuoso.dev/virtuoso-message-list/working-with-data/#prepending-data
Describe the bug When using Virtuoso to load new data while scrolling upwards, the newly loaded data causes the list to jump to the top instead of maintaining the scroll position.
Reproduction Use CodeSandbox to illustrate the problem so that I can observe the issue on your side and ensure that a potential fix reliably addresses it.
To Reproduce Steps to reproduce the behavior:
Expected behavior The list should maintain its scroll position after loading new data when scrolling upwards.
Screenshots
Additional context