-
|
I'm building a chat-like UI where answers to a question are appended dynamically and displayed using Virtualizer. While the content is still being appended, if I scroll in the opposite direction (upwards), the scroll position automatically jumps back toward the forward direction (downwards). It's difficult to explain clearly in words, so I’ve attached a video showing the behavior. Because the item sizes are not finalized while the data is still increasing, I suspect this might be a difficult problem to solve. However, I wanted to ask: Is there a recommended way to handle this behavior? virtua-negative-scroll-direction.mp4Platform
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
|
I think it's not the default behavior of Virtualizer. I guess the props passed or methods used might be the cause. Could you provide the actual code around Virtualizer? |
Beta Was this translation helpful? Give feedback.
-
|
I have shared a GitHub repository containing the code around the Virtualizer. https://github.com/tsujimic/virtua-app You can reproduce the issue by clicking the "Add 1" button in the app included in the repository. |
Beta Was this translation helpful? Give feedback.
I think it's not the default behavior of Virtualizer. I guess the props passed or methods used might be the cause.
Could you provide the actual code around Virtualizer?