From 98bec5686da0c4b7d0279b94968040b01e3218fa Mon Sep 17 00:00:00 2001
From: jdlugosz963 <jdlugosz963@gmail.com>
Date: Mon, 13 Dec 2021 15:21:21 +0100
Subject: add group searcher dont work for now

---
 src/components/Searcher.vue | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

(limited to 'src/components/Searcher.vue')

diff --git a/src/components/Searcher.vue b/src/components/Searcher.vue
index 8488fd4..a1093a2 100644
--- a/src/components/Searcher.vue
+++ b/src/components/Searcher.vue
@@ -61,9 +61,10 @@ export default {
       else this.current = this.sugestions[0]
     },
 
-    execute_current() {
-      let out = this.current[1](this)
-      
+    async execute_current() {
+      let out = await this.current[1](this)
+
+      console.log(out)
       if(out instanceof Object) {
         this.search = ''
         this.commands = out
@@ -71,25 +72,23 @@ export default {
     },
 
     hotkeys(e) {
+      e.preventDefault()
+
       switch(e.code) {
         case 'Escape':
         this.close()
         break
         case 'ArrowDown':
-          e.preventDefault()
           this.change_current(1)
           break
         case 'ArrowUp':
-          e.preventDefault()
           this.change_current(-1)
           break
         case 'Tab':
-          e.preventDefault()
           this.change_current(1)
           break
         case 'Enter':
           this.execute_current()
-          e.preventDefault()
           break
         case 'ShiftLeft':
           this.commands = CommandsService
-- 
cgit v1.2.3

