From f1ddbeadaf53a489cc30fc50c5c148a42d473aaf Mon Sep 17 00:00:00 2001 From: mikiher Date: Sat, 17 Aug 2024 06:08:32 +0300 Subject: [PATCH] Refactor menu keyoboard navigation into mixin --- .../modals/EditSeriesInputInnerModal.vue | 9 +- client/components/ui/InputDropdown.vue | 10 ++- client/components/ui/MultiSelect.vue | 57 ++----------- .../components/ui/MultiSelectQueryInput.vue | 58 ++----------- client/mixins/menuKeyboardNavigation.js | 83 +++++++++++++++++++ 5 files changed, 110 insertions(+), 107 deletions(-) create mode 100644 client/mixins/menuKeyboardNavigation.js diff --git a/client/components/modals/EditSeriesInputInnerModal.vue b/client/components/modals/EditSeriesInputInnerModal.vue index 628f6829..c70097a0 100644 --- a/client/components/modals/EditSeriesInputInnerModal.vue +++ b/client/components/modals/EditSeriesInputInnerModal.vue @@ -8,7 +8,7 @@
- +
@@ -66,6 +66,11 @@ export default { } }, methods: { + seriesNameInputHandler() { + if (this.$refs.sequenceInput) { + this.$refs.sequenceInput.setFocus() + } + }, setInputFocus() { if (this.isNewSeries) { // Focus on series input if new series @@ -134,4 +139,4 @@ export default { }, mounted() {} } - \ No newline at end of file + diff --git a/client/components/ui/InputDropdown.vue b/client/components/ui/InputDropdown.vue index 1567fd5b..314bc6e2 100644 --- a/client/components/ui/InputDropdown.vue +++ b/client/components/ui/InputDropdown.vue @@ -4,13 +4,13 @@
- +