feat(sqllab): Add keyboard shortcut helper (#25542)

This commit is contained in:
JUST.in DO IT
2023-10-12 11:13:37 -04:00
committed by GitHub
parent 62bffaf935
commit 2dc5c5f53f
4 changed files with 202 additions and 14 deletions

View File

@@ -23,13 +23,14 @@ import { css, styled, usePrevious } from '@superset-ui/core';
import { queryEditorSetSelectedText } from 'src/SqlLab/actions/sqlLab';
import { FullSQLEditor as AceEditor } from 'src/components/AsyncAceEditor';
import type { KeyboardShortcut } from 'src/SqlLab/components/KeyboardShortcutButton';
import useQueryEditor from 'src/SqlLab/hooks/useQueryEditor';
import { useAnnotations } from './useAnnotations';
import { useKeywords } from './useKeywords';
type HotKey = {
key: string;
descr: string;
key: KeyboardShortcut;
descr?: string;
name: string;
func: (aceEditor: IAceEditor) => void;
};