Can I drag new items into SortableTree?
joonasstenvall opened this issue · 4 comments
Hi, thank you for saving me many hours with this mini library of sorts.
So onto my question. Can I use two different SortableTrees and drag like in the example?
I think I should be able to since no major code is changed but I'm not quite sure since I'm a novice coder at best.
Cheers!
This is not something that is built-in, and honestly I haven't tried it.
But you are right, that it shouldn't be a problem.
I might provide an example, but it'd be somewhere next week
Yeah no worries. I think a way would be to expose some sort of wrapper for the general dropzones or something like that but I'm not sure at all.
Hi! Have you had any chance to look at this yet? No worries if you have not. Cheers!
yep, I checked an example in dnd-kit and it turns out it's a bit more complex.
There needs to be a <DndContext>
wrapping all columns, but in this project every <SortableTree>
has it's own <DndContext>
.
Personally I don't see an easy way to abstract the <SortableTree>
so that it could be put into a common context, sorry.
Seems like it'd be easier for you to go with dnd-kit directly