Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(tree): hidden notes appearing on root import (closes #5520)
Elian Doran65d3224c1a6c
diff --git a/apps/client/src/widgets/note_tree.ts b/apps/client/src/widgets/note_tree.tsindex 5918fa800b..27af4490ed 100644--- a/apps/client/src/widgets/note_tree.ts+++ b/apps/client/src/widgets/note_tree.ts@@ -1534,8 +1534,11 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {const hoistedNotePath = await treeService.resolveNotePath(this.noteContext.hoistedNoteId);if (!forceUpdate && this.lastFilteredHoistedNotePath === hoistedNotePath) {- // no need to re-filter if the hoisting did not change- // (helps with flickering on simple note change with large subtrees)+ // Hoisting did not change, so skip the expensive re-filter (avoids flickering on+ // simple note changes with large subtrees). The hidden-node class must still be+ // reapplied — the <li> may have been recreated by a lazy reload (e.g. via+ // `getNodeFromPath` → `parentNode.load(true)` after an import into root).+ this.toggleHiddenNode(this.noteContext.hoistedNoteId !== "root");return;}