-
Notifications
You must be signed in to change notification settings - Fork 871
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
[Enhancement] Keyboard shortcut for running queries #8322
base: main
Are you sure you want to change the base?
[Enhancement] Keyboard shortcut for running queries #8322
Conversation
Signed-off-by: sumukhswamy <sumukhhs@amazon.com>
ℹ️ Manual Changeset Creation ReminderPlease ensure manual commit for changeset file 8322.yml under folder changelogs/fragments to complete this PR. If you want to use the available OpenSearch Changeset Bot App to avoid manual creation of changeset file you can install it in your forked repository following this link. For more information about formatting of changeset files, please visit OpenSearch Auto Changeset and Release Notes Tool. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8322 +/- ##
=======================================
Coverage 64.14% 64.14%
=======================================
Files 3743 3743
Lines 88841 88841
Branches 13855 13855
=======================================
Hits 56985 56985
Misses 31241 31241
Partials 615 615
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -72,6 +72,20 @@ export default function QueryEditorTopRow(props: QueryEditorTopRowProps) { | |||
}, | |||
} = opensearchDashboards.services; | |||
|
|||
useEffect(() => { | |||
function handleCmdEnter(event: KeyboardEvent) { |
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.
I think we could use
this.inputRef which is the Monaco Editor ref and add an action like this
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.
Have updated it
Signed-off-by: sumukhswamy <sumukhhs@amazon.com>
Signed-off-by: sumukhswamy <sumukhhs@amazon.com>
Signed-off-by: sumukhswamy <sumukhhs@amazon.com>
Description
cmd+enter functionality runs the query in the editor
Issues Resolved
Screenshot
Testing the changes
Changelog
Check List
yarn test:jest
yarn test:jest_integration