Search code examples
vue.jsvuedraggable

VueDraggable : allow cloning only


Using this as an example
https://sortablejs.github.io/Vue.Draggable/#/clone

Imagine this is a shopping site and
"Draggable 1" is the items available in the shop
and "Draggable 2" is the user shopping cart.

User should be able to drag a item from available item to the shopping cart (which was achieved in the example).
But this should not be allowed to reorder the available item, how can I disable the dragging within the same draggable?


Solution

  • To stop the available items to sort simply add sort: false to your options.