react-arborist
react-arborist copied to clipboard
Provide ability to override the isLeaf calculation
Desired functionality:
I would love to provide the <Tree> class an isLeaf function of something like..
{(node) => !node.children || node.children.length === 0}
This would allow me to negate the 'folder' and 'file' concept and move closer towards something like Confluence spaces - where 'pages' can be also be parents.
As it currently stands, it seems the isLeaf function will only become true on data objects without parents - which makes modifying the original data structure more annoying :)