diff options
author | jdlugosz963 <jdlugosz963@gmail.com> | 2021-12-13 15:21:21 +0100 |
---|---|---|
committer | jdlugosz963 <jdlugosz963@gmail.com> | 2021-12-13 15:21:21 +0100 |
commit | 98bec5686da0c4b7d0279b94968040b01e3218fa (patch) | |
tree | 1489bbc80965457ba77c06da57ec496802b03c3d /src/components/Searcher.vue | |
parent | 4b6be9f09ff56dfae1c719cb744f2312e11be317 (diff) | |
download | lom_frontend-98bec5686da0c4b7d0279b94968040b01e3218fa.tar.gz lom_frontend-98bec5686da0c4b7d0279b94968040b01e3218fa.zip |
add group searcher dont work for now
Diffstat (limited to 'src/components/Searcher.vue')
-rw-r--r-- | src/components/Searcher.vue | 13 |
1 files changed, 6 insertions, 7 deletions
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 { | |||
61 | else this.current = this.sugestions[0] | 61 | else this.current = this.sugestions[0] |
62 | }, | 62 | }, |
63 | 63 | ||
64 | execute_current() { | 64 | async execute_current() { |
65 | let out = this.current[1](this) | 65 | let out = await this.current[1](this) |
66 | 66 | ||
67 | console.log(out) | ||
67 | if(out instanceof Object) { | 68 | if(out instanceof Object) { |
68 | this.search = '' | 69 | this.search = '' |
69 | this.commands = out | 70 | this.commands = out |
@@ -71,25 +72,23 @@ export default { | |||
71 | }, | 72 | }, |
72 | 73 | ||
73 | hotkeys(e) { | 74 | hotkeys(e) { |
75 | e.preventDefault() | ||
76 | |||
74 | switch(e.code) { | 77 | switch(e.code) { |
75 | case 'Escape': | 78 | case 'Escape': |
76 | this.close() | 79 | this.close() |
77 | break | 80 | break |
78 | case 'ArrowDown': | 81 | case 'ArrowDown': |
79 | e.preventDefault() | ||
80 | this.change_current(1) | 82 | this.change_current(1) |
81 | break | 83 | break |
82 | case 'ArrowUp': | 84 | case 'ArrowUp': |
83 | e.preventDefault() | ||
84 | this.change_current(-1) | 85 | this.change_current(-1) |
85 | break | 86 | break |
86 | case 'Tab': | 87 | case 'Tab': |
87 | e.preventDefault() | ||
88 | this.change_current(1) | 88 | this.change_current(1) |
89 | break | 89 | break |
90 | case 'Enter': | 90 | case 'Enter': |
91 | this.execute_current() | 91 | this.execute_current() |
92 | e.preventDefault() | ||
93 | break | 92 | break |
94 | case 'ShiftLeft': | 93 | case 'ShiftLeft': |
95 | this.commands = CommandsService | 94 | this.commands = CommandsService |