Closed lhalver1 closed 3 years ago
Yes, you can provide accepts
in the dragula options.
accepts: function (el, target, source, sibling) {
return true; // elements can be dropped in any of the `containers` by default
}
You can check if target
is same as el.parentElement
. You can validate and return true/false.
Is there a way to contain a draggable item to its' parent div? It is similar to what JQuery has here https://api.jqueryui.com/draggable/#option-containment