mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 04:26:01 +00:00
changing current DB handler for MySQL #1237
This commit is contained in:
@@ -265,9 +265,11 @@
|
||||
if (sid) {
|
||||
apiOn(`session-done-${sid}`, handleSessionDone);
|
||||
apiOn(`session-closed-${sid}`, handleSessionClosed);
|
||||
apiOn(`session-changedb-${sid}`, handleChangedDatabase);
|
||||
return () => {
|
||||
apiOff(`session-done-${sid}`, handleSessionDone);
|
||||
apiOff(`session-closed-${sid}`, handleSessionClosed);
|
||||
apiOff(`session-changedb-${sid}`, handleChangedDatabase);
|
||||
};
|
||||
}
|
||||
return () => {};
|
||||
@@ -566,6 +568,17 @@
|
||||
handleSessionDone();
|
||||
};
|
||||
|
||||
const handleChangedDatabase = async props => {
|
||||
changeTab(tabid, tab => ({
|
||||
...tab,
|
||||
props: {
|
||||
...tab.props,
|
||||
conid,
|
||||
database: props.database,
|
||||
},
|
||||
}));
|
||||
};
|
||||
|
||||
const { editorState, editorValue, setEditorData } = useEditorData({
|
||||
tabid,
|
||||
loadFromArgs:
|
||||
|
||||
Reference in New Issue
Block a user