Skip to content

Commit

Permalink
fix for moving note inside not-yet folder
Browse files Browse the repository at this point in the history
  • Loading branch information
zadam committed Jan 2, 2018
1 parent 37995f1 commit ae6e222
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions public/javascripts/tree_changes.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,16 @@ const treeChanges = (function() {
changeNode(nodeToMove, node => {
// first expand which will force lazy load and only then move the node
// if this is not expanded before moving, then lazy load won't happen because it already contains node
// this doesn't work if this isn't a folder yet, that's why we expand second time below
toNode.setExpanded(true);

node.moveTo(toNode);

toNode.folder = true;
toNode.renderTitle();

// this expands the note in case it become the folder only after the move
toNode.setExpanded(true);
});
}
}
Expand Down

0 comments on commit ae6e222

Please sign in to comment.