alekseymakhankov / hyper-tree

React treeview component
MIT License
68 stars 11 forks source link

Question: How to get current selected tree node ? #18

Open nichita-pasecinic opened 2 years ago

nichita-pasecinic commented 2 years ago

Awesome lib 🚀

I could use instance from useTreeState in order to get always the current selected node, filtering in flatData and searching for selected: true , but that is not optimal.

Is there any API of how to get the current selected node, I would especially need it to sync with some external store (recoil in my case) ?

Thanks!

alekseymakhankov commented 2 years ago

Hi @nichita-pasecinic, you can check issue