-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added shift+enter to run query in raw query editor #971
base: main
Are you sure you want to change the base?
Conversation
Hey guys! :) any news about this? |
Hey @nadav-dav - apologies for the delay, there were some unexpected side-effects that we're looking at before we can give a full review here 😊 thank you for the contribution and for checking in! |
Any update? |
if (e.key === 'Enter' && e.shiftKey) { | ||
e.preventDefault(); | ||
e.stopPropagation(); | ||
onRawQueryChange(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
onRawQueryChange(); | |
onRawQueryChange(editorRef.current?.getValue() || ''); |
|
||
const onRawQueryChange = (kql: string) => { | ||
const onRawQueryChange = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const onRawQueryChange = () => { | |
const onRawQueryChange = useCallback( | |
(kql: string) => { | |
reportInteraction('grafana_ds_adx_raw_editor_query_blurred'); | |
if (kql !== props.query.query) { | |
props.setDirty(); | |
props.onChange({ | |
...props.query, | |
query: kql, | |
}); | |
props.onRunQuery(); | |
} | |
}, | |
[props] | |
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @nadav-dav, apologies for the delay in reviewing this. I've suggested some changes as the current implementation has some lint issues.
Added shift+enter to run query in raw query editor :)