sveltejs / svelte-virtual-list

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

#43 scroll position #52

Open gitbreaker222 opened 3 years ago

gitbreaker222 commented 3 years ago

Before

Various use cases exist, where the scroll-position is not as expected - closes #43

After

A new method scrollToIndex is exposed to control the scroll-position from the consumer

This resolves following issues and PRs:

closes #15 closes #28 closes #30 closes #31 (PR) closes #32 closes #60 (PR; similar to #15)

gitbreaker222 commented 3 years ago

looking at #44 I think I should keep the height map part and test with variable-height-items :thinking:

edit: tested again and removed the fixed height: with and without the height-map part the scrollToItem method is unreliable. I think it is best to solve these things step by step:

BlueBomberman commented 3 years ago

Hi! is this available already?

gitbreaker222 commented 3 years ago

@BlueBomberman Unfortunately I haven't got any response from Rich Harris on this since about 6 months. Maybe I can ping somebody else from the svelte team? Let's find out:

@Conduitry are you maybe able to review/merge/assign this PR? It would resolve 5 issues 1 other PR 🌟

edit 2021-06-18 or @pngwn maybe?

stalkerg commented 3 years ago

@gitbreaker222 I suppose to make a fork will be much better in its current state.

juancarrey commented 3 years ago

I belive this may also fixes that if items are changed from the consumer (items filtered) the scroll position may out of range leaving the canvas empty.

mellson commented 2 years ago

I would really love to see this PR merged if it's possible. Is there any way we can help this component going forward? Are you looking for active maintainers etc?

gitbreaker222 commented 2 years ago

community-edition package finally available. Thx again @mellson and sry for the long wait everyone https://www.npmjs.com/package/svelte-virtual-list-ce

There will be some more upcoming changes to the readme and other maintenance stuff maybe :)