mirror of
https://github.com/apache/superset.git
synced 2026-04-23 01:55:09 +00:00
chore(sqllab): Add shortcuts for switching tabs (#30173)
This commit is contained in:
@@ -80,6 +80,7 @@ import {
|
||||
updateSavedQuery,
|
||||
formatQuery,
|
||||
fetchQueryEditor,
|
||||
switchQueryEditor,
|
||||
} from 'src/SqlLab/actions/sqlLab';
|
||||
import {
|
||||
STATE_TYPE_MAP,
|
||||
@@ -445,6 +446,22 @@ const SqlEditor: FC<Props> = ({
|
||||
formatCurrentQuery(true);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'switchTabToLeft',
|
||||
key: KeyboardShortcut.CtrlLeft,
|
||||
descr: KEY_MAP[KeyboardShortcut.CtrlLeft],
|
||||
func: () => {
|
||||
dispatch(switchQueryEditor(true));
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'switchTabToRight',
|
||||
key: KeyboardShortcut.CtrlRight,
|
||||
descr: KEY_MAP[KeyboardShortcut.CtrlRight],
|
||||
func: () => {
|
||||
dispatch(switchQueryEditor(false));
|
||||
},
|
||||
},
|
||||
];
|
||||
}, [dispatch, queryEditor.sql, startQuery, stopQuery, formatCurrentQuery]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user