mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-29 20:23:59 +00:00
fix
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { currentDatabase, openedTabs } from '../stores';
|
import { currentDatabase, openedTabs } from '../stores';
|
||||||
|
import { getConnectionInfo } from './metadataLoaders';
|
||||||
|
|
||||||
let lastCurrentTab = null;
|
let lastCurrentTab = null;
|
||||||
|
|
||||||
openedTabs.subscribe(value => {
|
openedTabs.subscribe(async value => {
|
||||||
const newCurrentTab = (value || []).find(x => x.selected);
|
const newCurrentTab = (value || []).find(x => x.selected);
|
||||||
if (newCurrentTab == lastCurrentTab) return;
|
if (newCurrentTab == lastCurrentTab) return;
|
||||||
|
|
||||||
@@ -14,8 +15,9 @@ openedTabs.subscribe(value => {
|
|||||||
database &&
|
database &&
|
||||||
(conid != _.get(lastCurrentTab, 'props.conid') || database != _.get(lastCurrentTab, 'props.database'))
|
(conid != _.get(lastCurrentTab, 'props.conid') || database != _.get(lastCurrentTab, 'props.database'))
|
||||||
) {
|
) {
|
||||||
|
const connection = await getConnectionInfo({ conid });
|
||||||
currentDatabase.set({
|
currentDatabase.set({
|
||||||
connection: { _id: conid },
|
connection,
|
||||||
name: database,
|
name: database,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user