fix(tree): Unexpected collapse after hoisting a note

This commit is contained in:
SiriusXT 2025-06-12 19:36:54 +08:00
parent 0d605cbc74
commit 369eb7844d

View File

@ -1507,6 +1507,12 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
); );
this.toggleHiddenNode(true); // hoisting will handle hidden note visibility 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);
}
} }
} }