Closed yakshit15 closed 4 years ago
you must use move function and restrict elements from moving (or show some info to your users)
dragula(containers, {
moves: function (el, source, handle, sibling) {
if(condition) //needed condition
return true //if el can move
else
return false // if el can not move
},
accepts: function (el, target, source, sibling) {
if(condition) //needed condition
return true //if el can dropped
else
return false // if el can not dropped
},
});
Like Microsoft Excel Pivot Mode, where we have 4 panels and it has the ability to drag and drop elements. I want to restrict few elements to get moved based on the condition of my JSON.