-
-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected behavior when jumping to the first item of reversed infinite list #357
Comments
The codesandbox looks private or not existed. |
Sorry, now it should be available |
Prepending during scrolling to was not expected. It might be better to fix the logic of imperative scrolling. |
I fixed the logic of scrollTo a bit in |
For some reason codesandbox doesn't see the new package version, but I ran the same example in storybook locally (pulled the latest changes), and seems like it's still reproduced |
You should replace |
I also managed to reproduce it with |
Can it be related to this issue by the way? Behavior looks similar |
#346 is a problem with prepending during native scroll. This issue is a problem with prepending during imperative scroll. |
Does it make sense to reopen this issue? Since it's reproduced not only for index=0? |
OK. I reopened it. |
Thanks, I will try using scrollTo + loading delay (only for jumping) for now |
Probably fixed in |
@inokawa it seems to be fixed, thanks! Your lib is awesome 🤩 |
Describe the bug
When I jump to the first item of reversed infinite list using
scrollToIndex
, scrollbar stays at the top and it keeps loading more and more items. It's not reproduced if I increase a new page loading delay.Video attached:
https://github.com/inokawa/virtua/assets/37265338/47cfab6b-058b-4449-8df9-620d0356fd93
To Reproduce
Link to the sandbox https://codesandbox.io/p/sandbox/virtua-reverse-infinite-scroll-74jnpn
Expected behavior
Scrollbar position is updated correctly as soon as new items are prepended, no matter if there is a delay or not
Platform:
The text was updated successfully, but these errors were encountered: