mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-22 23:56:00 +00:00
open server connection when opening DB connection
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user