Hello!
How do I not allow Drag-Drop to insert a node inside another node? Drag-Drop is only allowed at that level that the user is performing the Drag-Drop.
Thanks!
Hi Danilo,
To not allow dropping one node into the other, use the setting 'ztreeSettingsEdit.ztreeSettingsEdit.drag.ztreeSettingsEditDrag.inner' a false
To not allow dropping on another level, we can use the beforeDrop callback method.
here is the javascript;
function (treeId, treeNodes, targetNode, moveType) { var output = treeNodes[0].level== targetNode.level; if(!output){ alert('You cannot drag to another level'); } return output;
See screenshot: