ngx-virtual-scroller icon indicating copy to clipboard operation
ngx-virtual-scroller copied to clipboard

Loading in chunks - items are added continuously at top

Open Kartheek2016 opened this issue 4 years ago • 1 comments

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.

Kartheek2016 avatar May 18 '20 06:05 Kartheek2016

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.

Kartheek2016 avatar May 18 '20 06:05 Kartheek2016