mirror of
https://github.com/apache/superset.git
synced 2026-04-24 02:25:13 +00:00
fix: enable find text browser functionality inside SQL Lab editor (#19061)
This commit is contained in:
@@ -121,6 +121,8 @@ 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' },
|
||||
@@ -128,6 +130,7 @@ class AceEditorWrapper extends React.PureComponent<Props, State> {
|
||||
this.onAltEnter();
|
||||
},
|
||||
});
|
||||
|
||||
this.props.hotkeys.forEach(keyConfig => {
|
||||
editor.commands.addCommand({
|
||||
name: keyConfig.name,
|
||||
@@ -135,6 +138,7 @@ class AceEditorWrapper extends React.PureComponent<Props, State> {
|
||||
exec: keyConfig.func,
|
||||
});
|
||||
});
|
||||
|
||||
editor.$blockScrolling = Infinity; // eslint-disable-line no-param-reassign
|
||||
editor.selection.on('changeSelection', () => {
|
||||
const selectedText = editor.getSelectedText();
|
||||
|
||||
Reference in New Issue
Block a user