aboutsummaryrefslogtreecommitdiff
path: root/src/components/SearchModal.vue
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-03-27 00:43:10 +1100
committerTerry Truong <terry06890@gmail.com>2022-03-27 00:43:10 +1100
commit420734b0cc391b73b6f1a843accef34a510de10c (patch)
treefb499b111094e1d4135b1af4494f0297a1ad2e00 /src/components/SearchModal.vue
parenta9d783599e34572a87b1499ff58f19328698d69b (diff)
Make search shortcut re-focus input when search-bar is open
Diffstat (limited to 'src/components/SearchModal.vue')
-rw-r--r--src/components/SearchModal.vue3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/components/SearchModal.vue b/src/components/SearchModal.vue
index 6163d88..7e32236 100644
--- a/src/components/SearchModal.vue
+++ b/src/components/SearchModal.vue
@@ -27,6 +27,9 @@ export default defineComponent({
this.$emit('search-node', tolNode);
}
},
+ focusInput(){
+ (this.$refs.searchInput as HTMLInputElement).focus();
+ },
},
mounted(){
(this.$refs.searchInput as HTMLInputElement).focus();