mirror of
https://github.com/zadam/trilium.git
synced 2025-10-30 01:36:24 +01:00
workaround for filter + create child problems
This commit is contained in:
@@ -1123,6 +1123,11 @@ export default class NoteTreeWidget extends TabAwareWidget {
|
||||
await newActiveNode.setFocus(true);
|
||||
}
|
||||
}
|
||||
|
||||
if (noteIdsToReload.size > 0 || noteIdsToUpdate.size > 0) {
|
||||
// workaround for https://github.com/mar10/fancytree/issues/1054
|
||||
this.filterHoistedBranch();
|
||||
}
|
||||
}
|
||||
|
||||
sortChildren(node) {
|
||||
@@ -1185,7 +1190,12 @@ export default class NoteTreeWidget extends TabAwareWidget {
|
||||
|
||||
filterHoistedBranch() {
|
||||
if (this.tabContext) {
|
||||
this.tree.filterBranches(node => node.data.noteId === this.tabContext.hoistedNoteId);
|
||||
if (this.tabContext.hoistedNoteId === 'root') {
|
||||
this.tree.clearFilter();
|
||||
}
|
||||
else {
|
||||
this.tree.filterBranches(node => node.data.noteId === this.tabContext.hoistedNoteId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user