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.72k stars 106 forks source link

Can't figure out how to use with the Primevue Datatable and TreeTable #89

Open ZiadJ opened 5 months ago

ZiadJ commented 5 months ago

I've been struggling to make it work with the Primevue table components thus far. Is that even possible? Here, I tried both the function and markup versions: https://stackblitz.com/edit/e5tnqv?file=src%2FApp.vue

Alfred-Skyblue commented 5 months ago
  1. It is not allowed to use useDraggable within the onMounted hook.
  2. Both useDraggable and the v-model of vueDraggable require an initial value and cannot be undefined.
ZiadJ commented 5 months ago

When you say it is not allowed that's not a Vue limitation right? If so then, hopefully, we can find a way to work around the limitation. Not being able to use it with 3rd party components is an unnecessary limitation as far as I can tell.