frontend-collective / react-sortable-tree

Drag-and-drop sortable component for nested data and hierarchies
https://frontend-collective.github.io/react-sortable-tree/
MIT License
4.9k stars 897 forks source link

It is possible to use a node as ReactRef() ? #931

Open joelboergers opened 2 years ago

joelboergers commented 2 years ago

Hello,

i want to connect two node in two different tree with an arrow from the library Xarrows. The problem i have i that an arrow is connecte between two react element, (like the SortableTree how is an personal React element ), i had to get the react element of the node, it is possible ?.

here is a code sand box link (https://codesandbox.io/s/wild-surf-hz1gdc?file=/src/Tree.jsx)

If you know how to get access to a Node and use it with useRef(), thank you in advance for your help

joelboergers commented 2 years ago

@fritz-c how did you build your node structure, is it possible to access it?