Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am looking for some help on an implementation for infinite scrolling in both direction, up and down.
The down part is pretty simple. Because when I add new items to the end of the list, then only the scrollbar adjusts automatically. The list stays as is and does not scroll anywhere. This is desired behaviour.
When the list is on top and I prepend new items then by default is scrolls up to the new topmost item. But usually when prepending items in a infinite scrolling scenario the UI should stay as is, and only the scrollbar should adjust slightly to indicate that I can scroll up now.
I tried several scenarios to scroll to the last item prior to the prepend. This brings the item into the view, but usually not as the first item in the list.
Here is a small demo project which I started in case someone wants to play with it and try solutions:
https://github.com/agnauck/AvaloniaListBoxBug3/tree/infinite-scroll
Here is a virtual list component for vue.js. I want to have the same behaviour when prepending new items to my ViewModel which gets displayed using a VirtualizingStackPanel. Item height need to be dynamic which adds more complexity.
https://tangbc.github.io/vue-virtual-scroll-list/#/chat-room
Beta Was this translation helpful? Give feedback.
All reactions