Editor: New line on Enter, run query on Shift+Enter (#24654)

* Editor: New line on Enter, run query on Shift+Enter

- default Enter behavior on query editor fields should be a new line
- special behavior should require a special key: running a query is now
done on Shift-Enter
- Plugins order had to be changed because when typeahead is shown, Enter
is accepting the suggestion

* Run with ctrl-enter, hint in query placeholder

* Fix Kusto field behavior for Enter

* Fix Kusto field behavior for default suggestion
This commit is contained in:
David
2020-05-14 15:13:45 +02:00
committed by GitHub
parent e11504dcd2
commit 01bbcf4eea
11 changed files with 43 additions and 25 deletions

View File

@@ -340,7 +340,7 @@ class PromQueryField extends React.PureComponent<PromQueryFieldProps, PromQueryF
onBlur={this.props.onBlur}
onChange={this.onChangeQuery}
onRunQuery={this.props.onRunQuery}
placeholder="Enter a PromQL query"
placeholder="Enter a PromQL query (run with Shift+Enter)"
portalOrigin="prometheus"
syntaxLoaded={syntaxLoaded}
/>