treant-js
treant-js copied to clipboard
Collapsible + Hide + AnimateOnInit
If you have a chart which defines in config
animateOnInit: true,
hideRootNode: true,
node: {
collapsable: true
},
Treant.js will generate an error trying to install the expand/collapse handler. This will also cause the chart not to be rendered :).
Treant.js:236 Uncaught TypeError: Cannot read property 'classList' of undefined at Object.toggleClass (Treant.js:236) at TreeNode.toggleCollapse (Treant.js:1659) at Treant.js:514
This using the JSON chart pattern. I didn't test if this also occurs with the array assignment pattern. You can reproduce this by added hideRootNode: true
to the "collapsable" example.