fix(sidebar): clear children cache before refreshing expanded nodes
When refreshAllTree skipped collapsed child nodes, their IDs remained in loadedTreeNodeChildrenIds. After the parent was rebuilt with fresh children, expanding a previously-collapsed node hit useCachedChildren and returned immediately with empty children.
This commit is contained in:
parent
03cc4ba80a
commit
76ff987d00
|
|
@ -1089,6 +1089,7 @@ export const useConnectionStore = defineStore("connection", () => {
|
|||
continue;
|
||||
}
|
||||
if (!expandedIds.has(node.id)) continue;
|
||||
clearLoadedChildrenCache(node.id);
|
||||
node.children = [];
|
||||
await loadTreeNodeChildren(node, { force: true });
|
||||
await restoreExpandedChildren(node, expandedIds, { force: true });
|
||||
|
|
|
|||
Loading…
Reference in New Issue