vis-data icon indicating copy to clipboard operation
vis-data copied to clipboard

Feature request: Add a destroy method to the dataset

Open AlexDM0 opened this issue 4 years ago • 0 comments

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?

AlexDM0 avatar Nov 03 '21 10:11 AlexDM0