How can I add child list (nested)?
How can I add child list (nested)? With this component some example?
example https://fritz-c.github.io/react-sortable-tree/
@ztvMark , here is a jsfiddle with something similar to waht you want to achieve: https://jsfiddle.net/dede89/v8gme77z/38/
Probably the best way is to create a small component based on draggable for this purpose.
@ztvMark , was the example helpful?
@David-Desmaisons thank you for a helpful example. It works great! I've notice that one use case is not working: when I try to add children to parent w/o children. Is it possible to make it work?
@kukula : please: update the jsfidle with what you are trying to do + create a new issue
@David-Desmaisons Thank you for the fast answer!
@David-Desmaisons There will be an error when i move an item in your jsfiddle Error in console:
vuedraggable.min.js:1 Uncaught TypeError: Cannot read property 'nextSibling' of undefined
at n (vuedraggable.min.js:1)
at VueComponent.onDragRemove (vuedraggable.min.js:1)
at VueComponent.boundFn [as onDragRemove] (vue.js:184)
at a.<anonymous> (vuedraggable.min.js:1)
at j (Sortable.min.js:2)
at a._onDrop (Sortable.min.js:2)
at a.handleEvent (Sortable.min.js:2)
Looking forward to your kind reply !