ngx-virtual-scroller
ngx-virtual-scroller copied to clipboard
Loading in chunks - items are added continuously at top
Please check the samples: https://rintoj.github.io/ngx-virtual-scroller/samples
- Go to LOADING IN CHUNKS
- Check the Add items at top checkbox.
- Also enable random heights.
- Now scroll a bit down and then up (which should reach the scroll top 0).
- Then the items are getting added continuously and the scroll doesn't stop at the first element in the viewport (i.e., when the items are prepended at scrollTop 0 then the scroll shouldn't move same as when we append the item at the bottom).
Need a quick solution for this or a workaround example in stackblitz would be helpful.
The same scenario doesn't work WITH SINGLE COLUMN example also.
- Go to WITH SINGLE COLUMN
- Enable random heights (i.e., Toggle Random Height).
- Now prepend 10 items.
- Then viewport should contain the same elements before prepending i.e, from index 0-4 but it scrolls to the prepended items. whereas it shouldn't change the viewport but the scroll to adjust depending on the prepended items height.
The viewport is changed when the items are prepended/appended which shouldn't.