almende / vis

⚠️ This project is not maintained anymore! Please go to https://github.com/visjs
7.86k stars 1.48k forks source link

timeline.destroy does not unmount react templates #4257

Open mjhalme opened 5 years ago

mjhalme commented 5 years ago

I am using timelines in single page application. When page is changed timeline.destroy is called.

I also use react templates for the items, they are rendered like this: template: function(item, element) { return ReactDOM.render(, element); }

Seems that, when timeline is destroyed, componentWillUnmount never gets called for the components. That leads to the situation, where components are still visible in react debugger, but they are not attached in DOM.

I think ReactDOM.unmountComponentAtNode(element) should be called for each item when timeline is destroyed, but that's not happening.