fix(sqlserver): restore view selection after reconnect

This commit is contained in:
zipg authored and GitHub committed 2026-07-16 17:30:49 +08:00
1 parent 67b04f5635
commit c4f4ce2460
2 files changed
+18

No files matched your search

@@ -783,6 +783,12 @@ async function ensureTreeLoadedForTarget(target: ActiveTabSidebarTarget, opts?:
if (force || !databaseChildrenLoaded) {
await store.loadSqlServerDatabaseObjects(connId, target.database, loadOptions);
}
if (targetSchema) {
const schemaNode = findSchemaNode(store.treeNodes, connId, target.database, targetSchema);
if (schemaNode && (force || !schemaNode.children || schemaNode.children.length === 0)) {
await store.loadTables(connId, target.database, targetSchema, loadOptions);
}
}
} else if (usesSchemaTree) {
if (force || !databaseChildrenLoaded) {
await store.loadSchemas(connId, target.database, loadOptions);