dnd-kit
dnd-kit copied to clipboard
Question: Does `useSortable` support nested tree structure, and how to do this?
This official sortable tree example uses a flat list data structure, But our data is organized in a nested tree structure, the SortableContext
seems not proper to use.
Any suggestion or good practice here are very appreciated.
It should. At least I got it working with easy by using this extraction of it.
Although it does not seem to support dragging between two different tree sources but since it's a wrapper of sorts it should not be hard to do.
@joonasstenvall The example you provide actually uses flat list internally, what I want is rendering the tree by recursion, and no need to flatten the tree data, compute the depth, etc. These computations may cause performance problems if there are a lot of items.
@pureliumy did you find a way of using dnd-kit for your need? I'm currently trying to do the same thing. Thanks!
@pureliumy did you find a way of using dnd-kit for your need? I'm currently trying to do the same thing. Thanks!
Sorry, not yet.
@pureliumy now did you find any way to make it work?
its really hard I am working on it over 2 weeks already, without any solution