Alfred-Skyblue / vue-draggable-plus

Universal Drag-and-Drop Component Supporting both Vue 3 and Vue 2
https://vue-draggable-plus.pages.dev/en/
MIT License
2.74k stars 105 forks source link

Usage with multiple lists (group, dynamic refs) #1

Closed ttxtosca closed 1 year ago

ttxtosca commented 1 year ago

Hello @Alfred-Skyblue,

I just tested your version of 'vue-draggable', which looks promising due to recent bugs I found with alternatives.

It works fine for a single list (with hooks fashion), as with 2 "connected" lists manually. But I can't make it work for dynamic lists (or nested v-for), eg. a first v-for for say 2 columns, the second one for the items in each column.

Using recommended methods for "dynamic refs" won't work :

https://vuejs.org/guide/essentials/template-refs.html#refs-inside-v-for https://vuejs.org/guide/essentials/template-refs.html#function-refs

Any idea about this use case? Is that even possible with current state of library?

PS: I got these 2 errors :

[vue-draggable-plus]: Root element not found
Uncaught Sortable: `el` must be an HTMLElement, not [object Undefined]
ttxtosca commented 1 year ago

For more information, I'm using Githubissues.

  • Githubissues is a development platform for aggregating issues.