From e83a3bbab9d1e0e58cd3d6393cc3bf5f762d577a Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Fri, 8 May 2026 19:52:36 +0800 Subject: [PATCH] fix: only show configured database in sidebar when specified (#160) --- src/stores/connectionStore.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/stores/connectionStore.ts b/src/stores/connectionStore.ts index ca92a5ed1..0ef56ca4b 100644 --- a/src/stores/connectionStore.ts +++ b/src/stores/connectionStore.ts @@ -361,7 +361,11 @@ export const useConnectionStore = defineStore("connection", () => { node.isLoading = true; try { await ensureConnected(connectionId); - const databases = await api.listDatabases(connectionId); + let databases = await api.listDatabases(connectionId); + const config = getConfig(connectionId); + if (config?.database) { + databases = databases.filter((db) => db.name === config.database); + } setChildren( node, databases.map((db) => ({