cameronhimself / vue-drag-drop

A lightweight Vue wrapper that abstracts away the wonkier parts of the Drag and Drop Browser API
496 stars 83 forks source link

droppable prop, support for both draggable and droppable elements #71

Open syzhakov opened 5 years ago

syzhakov commented 5 years ago

Is there a reason you have a draggable prop but no droppable? I'm trying to create an element which is both draggable and droppable, without creating those nested divs that any of those components create. I also want to dynamically modify it's droppable property and expect not to use v-if v-else for that, just like draggable prop.

mwazovzky commented 5 years ago

I also need droppable prop. My use case -> tree structure where every node is both draggable & droppable. Works like a charm, but.. I want to disable droppable for node being drugged, to prevent it from dropping into itself.

P.S. @cameronhimself really great library! very simple && clean api, THANKS!

vikingvynotking commented 2 years ago

+1 for this, especially as the tag attribute doesn't seem to like custom elements. To support optional drop (needed for my use case), I end up having to wrap two different but largely similar elements, one as a drop, one as the actual element, which violates DRY and creates a maintenance headache. It would be far simpler to have a single element with draggable, droppable attributes which I can easily manipulate.