svelte-virtual-list icon indicating copy to clipboard operation
svelte-virtual-list copied to clipboard

fix: now scrolls to top if the items array changes.

Open kevmodrome opened this issue 6 years ago • 2 comments

This fixes issue #30

kevmodrome avatar Oct 06 '19 19:10 kevmodrome

looks good to me :+1: I thought of the same solution when my playlist-repl has several 1000 songs and i filter for names while scroll position is somewhere in the middle

gitbreaker222 avatar Apr 06 '20 13:04 gitbreaker222

edit: if I understand this correctly, refresh with the new "scrollUp" would be called if the next list length is smaller or greater. But if the list gets longer, it would (re)create another issue as described in #15

=> if we add items (lazy loading / infinite scroll) we want to keep the current scroll position

So right now we have: :negative_squared_cross_mark: filter: removing items resets scroll to top (prevent empty viewport) :ballot_box_with_check: load more: adding items keeps scroll position

And this PR turns it around to: :ballot_box_with_check: filter: removing items resets scroll to top :negative_squared_cross_mark: load more: adding items keeps scroll position

gitbreaker222 avatar Apr 08 '20 08:04 gitbreaker222