fix(sidebar): restore loaded pages after clearing search

This commit is contained in:
zipg authored and GitHub committed 2026-09-20 19:36:31 +08:00
1 parent 04c55ad067
commit 786fea8418
7 files changed
+152 -6

No files matched your search

@@ -434,7 +434,9 @@ function collectExpandedObjectSearchTargets(node: TreeNode, tasks: SidebarSearch
// back. Its next explicit expansion will load the ordinary first page.
node.isExpanded = false;
store.discardFilteredTreeNodeChildren(node.id);
} else {
} else if (!store.restoreFilteredObjectGroupChildren(node)) {
// Nothing was captured because the group had not been loaded before the
// search, so there is no previous list to put back.
tasks.push(() => store.loadObjectGroupChildren(node, { force: true }));
}
} else if (simpleObjectParentTypes.has(node.type)) {