Attributes
Preventing some elements from initiating a drag action.
When an item doesn’t contain a handle element, it can be dragged from any part of it. However, you can prevent dragging on specific elements by marking them as no-drag elements.
To make elements as no-drag, add the attribute data-swapy-no-drag
.
<div data-swapy-item="foo">
<div data-swapy-no-drag></div>
<button data-swapy-no-drag></button>
<!-- Item content... -->
</div>
We have two no-drag elements in this example.