Skip to content

Build your personal knowledge base with Trilium Notes

fix(tree): Unexpected collapse after hoisting a note

SiriusXT369eb7844d05
diff --git a/apps/client/src/widgets/note_tree.ts b/apps/client/src/widgets/note_tree.ts
index 662562f424..46abe10a02 100644
--- a/apps/client/src/widgets/note_tree.ts
+++ b/apps/client/src/widgets/note_tree.ts
@@ -1507,6 +1507,12 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
);
this.toggleHiddenNode(true); // hoisting will handle hidden note visibility
+
+ // Automatically expand the hoisted note by default
+ const node = this.getActiveNode();
+ if (node.data.noteId === this.noteContext.hoistedNoteId){
+ this.setExpanded(node.data.branchId, true);
+ }
}
}