fixes for invalid operations on root note

This commit is contained in:
azivner
2018-10-21 22:42:20 +02:00
parent bfa2b5fa62
commit 0c007566ad
10 changed files with 51 additions and 9 deletions

View File

@@ -14,6 +14,10 @@ const dragAndDropSetup = {
preventVoidMoves: true, // Prevent dropping nodes 'before self', etc.
dragStart: (node, data) => {
if (node.data.noteId === 'root') {
return false;
}
// This function MUST be defined to enable dragging for the tree.
// Return false to cancel dragging of node.
return true;