minop1205 / react-dnd-treeview

A draggable / droppable React-based treeview component. You can use render props to create each node freely.
MIT License
516 stars 69 forks source link

Open method not working #194

Closed alialaa closed 1 year ago

alialaa commented 1 year ago

Using the ref to open a node by its ID doesn't seem to be working. the close method works though. Here is a demo.

minop1205 commented 1 year ago

@alialaa Thanks for reporting the bug.

It was caused by the fact that the open method was only working on droppable nodes. It is strange that there is a dependency between droppable property and the open/closed state of a node, so I have fixed this issue.

I have just released v3.4.4, so please try the latest version.

npm install @minoru/react-dnd-treeview@latest