react-arborist icon indicating copy to clipboard operation
react-arborist copied to clipboard

Provide ability to override the isLeaf calculation

Open downright-development opened this issue 11 months ago • 4 comments

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 :)

downright-development avatar Dec 24 '24 18:12 downright-development