Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated event #13

Open
gVguy opened this issue Jun 15, 2023 · 2 comments
Open

updated event #13

gVguy opened this issue Jun 15, 2023 · 2 comments

Comments

@gVguy
Copy link

gVguy commented Jun 15, 2023

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.

@v1ack
Copy link
Owner

v1ack commented Jul 8, 2023

Can you explain how you are going to use it?

@gVguy
Copy link
Author

gVguy commented Jul 9, 2023

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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants