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

Tiny virtual grid?

Open janosh opened this issue 3 years ago • 5 comments

Nice work! Any plans to implement svelte-tiny-virtual-grid or perhaps advice on how to go about that?

janosh avatar May 05 '21 19:05 janosh

Alright. This answer is a bit late, but I finally got the motivation to revisit my older projects.

The thing is... If you'd ask me how this library works, I wouldn't really know 😅 Most of the code is just taken from react-tiny-virtual-list and I've just made it compatible with Svelte. So maybe perhabs one day, I'll rewrite this whole thing using my own code. But for now I don't have any plans for such a library. Sorry...

jonasgeiler avatar Sep 28 '21 22:09 jonasgeiler

@janosh I would say the virtual grid would use the same principles of what should be displayed at the moment, but in general it's something completely different than simple list. As @Skayo said, it would be totally new library.

mskocik avatar Sep 29 '21 07:09 mskocik

You could do something like suggested in https://github.com/sveltejs/svelte-virtual-list/issues/16#issuecomment-903715845

Here is a working example for skyao/svelte-tiny-virtual-list: https://svelte.dev/repl/2250c4b4e7054b01ac9329f827bee090?version=3.44.0

Amerlander avatar Oct 27 '21 22:10 Amerlander

Here is a working example for skyao/svelte-tiny-virtual-list: https://svelte.dev/repl/2250c4b4e7054b01ac9329f827bee090?version=3.44.0

Would this work with a horizontal scroll bar too?

bbigras avatar Jan 25 '22 18:01 bbigras

It should not matter in what direction you scroll. The Idea is to create a div containing one full Row/Column and the virtual list treats each column/row as a single item.

Amerlander avatar Jan 25 '22 20:01 Amerlander