almende / vis

⚠️ This project is not maintained anymore! Please go to https://github.com/visjs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

timeline.destroy does not unmount react templates

mjhalme opened this issue · comments

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.