Skip to content

Commit

Permalink
fix: enable find text browser functionality inside SQL Lab editor (#1…
Browse files Browse the repository at this point in the history
…9061)

(cherry picked from commit fd757c4)
  • Loading branch information
diegomedina248 authored and villebro committed Apr 3, 2022
1 parent 005949f commit 4c9785f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,20 +121,24 @@ class AceEditorWrapper extends React.PureComponent<Props, State> {
}

onEditorLoad(editor: any) {
editor.commands.removeCommand('find');

editor.commands.addCommand({
name: 'runQuery',
bindKey: { win: 'Alt-enter', mac: 'Alt-enter' },
exec: () => {
this.onAltEnter();
},
});

this.props.hotkeys.forEach(keyConfig => {
editor.commands.addCommand({
name: keyConfig.name,
bindKey: { win: keyConfig.key, mac: keyConfig.key },
exec: keyConfig.func,
});
});

editor.$blockScrolling = Infinity; // eslint-disable-line no-param-reassign
editor.selection.on('changeSelection', () => {
const selectedText = editor.getSelectedText();
Expand Down

0 comments on commit 4c9785f

Please sign in to comment.