Vue.Draggable icon indicating copy to clipboard operation
Vue.Draggable copied to clipboard

How can I add child list (nested)?

Open zkmark opened this issue 9 years ago • 6 comments

How can I add child list (nested)? With this component some example?

example https://fritz-c.github.io/react-sortable-tree/

zkmark avatar Mar 21 '17 05:03 zkmark

@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.

David-Desmaisons avatar Mar 21 '17 12:03 David-Desmaisons

@ztvMark , was the example helpful?

David-Desmaisons avatar Mar 22 '17 12:03 David-Desmaisons

@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 avatar Jul 14 '17 13:07 kukula

@kukula : please: update the jsfidle with what you are trying to do + create a new issue

David-Desmaisons avatar Jul 14 '17 13:07 David-Desmaisons

@David-Desmaisons Thank you for the fast answer!

kukula avatar Jul 14 '17 14:07 kukula

@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 !

yhshen93 avatar Aug 02 '17 00:08 yhshen93