mirror of
https://github.com/zadam/trilium.git
synced 2025-01-07 23:58:50 +08:00
fix pasting into non-expanded non-loaded node (UI only)
This commit is contained in:
parent
da2cd57428
commit
332fc16852
1 changed files with 4 additions and 2 deletions
|
@ -29,10 +29,12 @@ const treeChanges = (function() {
|
||||||
await server.put('notes/' + node.data.note_tree_id + '/move-to/' + toNode.data.note_id);
|
await server.put('notes/' + node.data.note_tree_id + '/move-to/' + toNode.data.note_id);
|
||||||
|
|
||||||
changeNode(node, node => {
|
changeNode(node, node => {
|
||||||
node.moveTo(toNode);
|
// 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
|
||||||
toNode.setExpanded(true);
|
toNode.setExpanded(true);
|
||||||
|
|
||||||
|
node.moveTo(toNode);
|
||||||
|
|
||||||
toNode.folder = true;
|
toNode.folder = true;
|
||||||
toNode.renderTitle();
|
toNode.renderTitle();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue