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

updated event

Open gVguy opened this issue 2 years ago • 2 comments

I would appreciate if this library implemented an updated event fired from the VirtualList component each time the rendered items are updated.

Can be something as simple as afterUpdate(() => dispatch('updated'))

It would help a great deal thank you.

gVguy avatar Jun 15 '23 10:06 gVguy

Can you explain how you are going to use it?

v1ack avatar Jul 08 '23 22:07 v1ack

I ended up writing my own virtual list component to suit my needs, but I still recommend that you add this functionality, since it's very easy to implement and can be useful to someone in the future.

Updated event is necessary for when the user needs to interact with the DOM directly (for example with third party libraries) every time new items are rendered to the view. And the only way to track that DOM update is by listening to such event.

You can see some other thematic packages implementing this functionality, eg:

gVguy avatar Jul 09 '23 05:07 gVguy