First off, really great tree lib its very straightforward to use especially with the data setup!
I am having an issue with rendering my (multi) selected nodes however and was hoping you could help.
Issue explained:
When I multi select my tree nodes, the last item clicked is the only node that renders as a selected item. I thought that the multi-select was turned off but after some digging and some logging to the console using onSelect it appears that the nodes in question are in fact selected.
I stripped the tree down to its absolute bare minimum to render some test data and found that the selection is happening on the css chunk for "treeitem: focus-within" and nodeSelected is never being used like in the example.
I also considered that it could be an issue with the component lib I use for other components (Mantine) but I stripped any reference of Mantine or any other component lib from the app for this testing branch and no change.
Is this an issue with my implementation or an issue with it being inside an Electron based app perhaps?
Would be great to get some eyes on this as I would love to continue to use and support the Arborist tree component! :)
Hello!
First off, really great tree lib its very straightforward to use especially with the data setup!
I am having an issue with rendering my (multi) selected nodes however and was hoping you could help.
Issue explained: When I multi select my tree nodes, the last item clicked is the only node that renders as a selected item. I thought that the multi-select was turned off but after some digging and some logging to the console using onSelect it appears that the nodes in question are in fact selected.
I took a look at some examples online (this specifically: https://codesandbox.io/p/sandbox/angry-turing-lljvq9?file=%2Fsrc%2Fcomponents%2FNode.js) to see if I had missed something or have implemented it wrong.
I stripped the tree down to its absolute bare minimum to render some test data and found that the selection is happening on the css chunk for "treeitem: focus-within" and nodeSelected is never being used like in the example.
I also considered that it could be an issue with the component lib I use for other components (Mantine) but I stripped any reference of Mantine or any other component lib from the app for this testing branch and no change.
Is this an issue with my implementation or an issue with it being inside an Electron based app perhaps?
Would be great to get some eyes on this as I would love to continue to use and support the Arborist tree component! :)
I have left the code below for reference:
Tree itself
The Node
The CSS: