From 566082d40f6db638a093133fbec10a475fdbf4f0 Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Thu, 19 May 2022 12:26:28 +0200 Subject: [PATCH] open server connection when opening DB connection --- packages/web/src/stores.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/web/src/stores.ts b/packages/web/src/stores.ts index 43e0ef398..d9c0ca111 100644 --- a/packages/web/src/stores.ts +++ b/packages/web/src/stores.ts @@ -187,6 +187,10 @@ export const getPinnedDatabases = () => _.compact(pinnedDatabasesValue); let currentDatabaseValue = null; currentDatabase.subscribe(value => { currentDatabaseValue = value; + if (value?.connection?._id) { + openedConnections.update(x => _.uniq([...x, value?.connection?._id])); + expandedConnections.update(x => _.uniq([...x, value?.connection?._id])); + } invalidateCommands(); }); export const getCurrentDatabase = () => currentDatabaseValue;