sveltejs / svelte-virtual-list

A virtual list component for Svelte apps
https://svelte.dev/repl/f78ddd84a1a540a9a40512df39ef751b
Other
684 stars 58 forks source link

List gets broken when its offscreen #19

Open Nexxtron opened 6 years ago

Nexxtron commented 6 years ago

Hey, nice virtual-list! Thank you! Unfortunately I found some issues... 1) When the 'items' property changes and the virtual-list is off-screen (ex. display:none) the list never gets filled again with items :/ see: https://svelte.technology/repl?version=2.13.4&gist=b31acc26d0b807323fd3271e2d634b0c The problem occurs, when you first add the data and then show the virtual-list :/ Afterwards, when I refresh the list or set other data while the list is visible, some errors like in point 2 are thrown. After that all onstate calls are blocked because of this issue: https://github.com/sveltejs/svelte/issues/1717 2) If you scroll up very fast, the virtual-list throws some errors: "TypeError: this.rows[(i - newStart)] is undefined" thats not an issue at all, but fair to point out!

Any chance to fix these? Or is there a workaround?

Thank your for your time!

gitbreaker222 commented 4 years ago

hi @Nexxtron - I currently summarize issues with changing list.length and it seems, that this also falls into that category (even if maybe a bit outdated :wink:).

When checking out the linked repl, I get following error:

Error loading @sveltejs/svelte-virtual-list from bundle.run

Could you check out for the current svelte v3 if this issue is reproducable?