rlemaigre / Easy-DnD

A drag and drop implementation for Vue.js 2 and 3 https://codesandbox.io/s/easy-dnd-demo-9mbij https://codesandbox.io/s/easy-dnd-demo-2-xnqbz
MIT License
384 stars 52 forks source link

drop list nest item #94

Closed EthanHung closed 2 years ago

EthanHung commented 3 years ago

how can I create a nested item list in drop-list for "another item list"? I would like to drop in to second list and drop to list item image

slinclau commented 3 years ago

Hi. you need to use recursive components to achieve this. to render an item, I use a condition: "does it support children nodes" if yes: render a item list container else: render my "leaf" component

EthanHung commented 3 years ago

Hi. you need to use recursive components to achieve this. to render an item, I use a condition: "does it support children nodes" if yes: render a item list container else: render my "leaf" component

sorry I dun get it. is there any example code? I tried to add the code at line 102 to drop the item in the output list

https://codesandbox.io/s/nested-drop-lists-forked-539qx?file=/src/App.vue