fix: only show configured database in sidebar when specified (#160)
This commit is contained in:
parent
0e6617c817
commit
e83a3bbab9
|
|
@ -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) => ({
|
||||
|
|
|
|||
Loading…
Reference in New Issue