mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 10:55:55 +01:00
improve performance when quickly switching notes (by e.g. holding down arrow in the tree)
This commit is contained in:
@@ -332,13 +332,14 @@ function initFancyTree(tree) {
|
||||
}
|
||||
},
|
||||
activate: (event, data) => {
|
||||
const node = data.node.data;
|
||||
const node = data.node;
|
||||
const noteId = node.data.noteId;
|
||||
|
||||
setCurrentNotePathToHash(data.node);
|
||||
setCurrentNotePathToHash(node);
|
||||
|
||||
noteDetailService.switchToNote(node.noteId);
|
||||
noteDetailService.switchToNote(noteId);
|
||||
|
||||
showPaths(node.noteId, data.node);
|
||||
showPaths(noteId, node);
|
||||
},
|
||||
expand: (event, data) => setExpandedToServer(data.node.data.branchId, true),
|
||||
collapse: (event, data) => setExpandedToServer(data.node.data.branchId, false),
|
||||
|
||||
Reference in New Issue
Block a user