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

Feature request: Add a destroy method to the dataset #831

Open
AlexDM0 opened this issue Nov 3, 2021 · 0 comments
Open

Feature request: Add a destroy method to the dataset #831

AlexDM0 opened this issue Nov 3, 2021 · 0 comments

Comments

@AlexDM0
Copy link
Contributor

AlexDM0 commented Nov 3, 2021

Hi guys, I've been working on a project with the vis-timeline and the dataset in a react environment. When the component gets removed, I'd like to destroy the datasets along with the timeline.

The timeline (and other vis components) have a destroy method, which removes all data and event listeners.

Sure, the timeline destroy will remove the event listeners it has on the dataset. If I remove the datasets first (clear(), flush()?) first, this would trigger a redraw of the timeline, which is also in the process of being destroyed. This introduces a race condition I could solve, but ideally would want to sidestep by a destroy method on the dataset itself.

What do you guys think?

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

1 participant