fix(sidebar): preserve expansion after object rename

This commit is contained in:
t8y2
2026-05-18 22:17:45 +08:00
parent 94eeb38d63
commit b424816f74
2 changed files with 21 additions and 8 deletions
@@ -844,14 +844,7 @@ function dropTable() {
async function refreshTableList(node: TreeNode) {
if (!node.connectionId || !node.database) return;
const config = connectionStore.getConfig(node.connectionId);
if (config?.db_type === "sqlserver" && node.schema?.toLowerCase() === "dbo") {
await connectionStore.loadSqlServerDatabaseObjects(node.connectionId, node.database, { force: true });
} else if (node.schema) {
await connectionStore.loadTables(node.connectionId, node.database, node.schema, { force: true });
} else {
await connectionStore.loadTables(node.connectionId, node.database, undefined, { force: true });
}
await connectionStore.refreshObjectListTreeNode(node.connectionId, node.database, node.schema);
}
async function confirmDropTable() {