mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-30 00:19:35 +00:00
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:
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user