Can Drag and Drop Be Used in a Tree Component? #7614
-
Hello, I am working on a Tree component and looking to implement drag-and-drop functionality for managing its nodes. In the documentation, I couldn’t find explicit details about whether useTreeState, useDraggableCollection, and useDroppableCollection can be combined to achieve this. Is this something that could be implemented? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
If you're using the hooks, there shouldn't be anything stopping you. You'll probably have to dig into the source a fair bit and see how we implemented it for Tables, Lists, etc. If you're referring to https://react-spectrum.adobe.com/react-aria/Tree.html#tree then drag and drop is coming soon, this component is still in fairly early days and will see more features added https://github.com/orgs/adobe/projects/19/views/4?visibleFields=%5B%22Title%22%2C%22Assignees%22%2C%22Status%22%2C86111807%2C4406231%2C25365423%2C3244152%2C30557450%2C5195578%2C17851188%2C3404283%5D&filterQuery=tree&pane=issue&itemId=83692417 |
Beta Was this translation helpful? Give feedback.
If you're using the hooks, there shouldn't be anything stopping you. You'll probably have to dig into the source a fair bit and see how we implemented it for Tables, Lists, etc.
If you're referring to https://react-spectrum.adobe.com/react-aria/Tree.html#tree then drag and drop is coming soon, this component is still in fairly early days and will see more features added https://github.com/orgs/adobe/projects/19/views/4?visibleFields=%5B%22Title%22%2C%22Assignees%22%2C%22Status%22%2C86111807%2C4406231%2C25365423%2C3244152%2C30557450%2C5195578%2C17851188%2C3404283%5D&filterQuery=tree&pane=issue&itemId=83692417