aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/components/SearchInput.vue
diff options
context:
space:
mode:
authorBastien Wirtz <bastien.wirtz@gmail.com>2020-10-23 18:26:41 -0700
committerGitHub <noreply@github.com>2020-10-23 18:26:41 -0700
commit37dfd2a132d883482b330b22a7c19d86948a391c (patch)
tree361edff077dc7d1796389685a7bfd55ed28473fa /src/components/SearchInput.vue
parentc368290e32213f537b7b1479d767ee404b0a8399 (diff)
parented8b17e0df7ffa64e392bacbd2abf6492fdfb3f1 (diff)
downloadhomer-37dfd2a132d883482b330b22a7c19d86948a391c.tar.gz
homer-37dfd2a132d883482b330b22a7c19d86948a391c.tar.zst
homer-37dfd2a132d883482b330b22a7c19d86948a391c.zip
Merge pull request #139 from Genymobile/update-deps-and-fix-code-styles
Update deps & fix lint issues
Diffstat (limited to 'src/components/SearchInput.vue')
-rw-r--r--src/components/SearchInput.vue8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/SearchInput.vue b/src/components/SearchInput.vue
index 22b5eef..9419db3 100644
--- a/src/components/SearchInput.vue
+++ b/src/components/SearchInput.vue
@@ -6,8 +6,8 @@
6 ref="search" 6 ref="search"
7 :value="value" 7 :value="value"
8 @input="$emit('input', $event.target.value.toLowerCase())" 8 @input="$emit('input', $event.target.value.toLowerCase())"
9 @keyup.enter.exact="$emit('search:open')" 9 @keyup.enter.exact="$emit('search-open')"
10 @keyup.alt.enter="$emit('search:open', '_blank')" 10 @keyup.alt.enter="$emit('search-open', '_blank')"
11 /> 11 />
12 </div> 12 </div>
13</template> 13</template>
@@ -20,7 +20,7 @@ export default {
20 this._keyListener = function (event) { 20 this._keyListener = function (event) {
21 if (event.key === "/") { 21 if (event.key === "/") {
22 event.preventDefault(); 22 event.preventDefault();
23 this.$emit("search:focus"); 23 this.$emit("search-focus");
24 this.$nextTick(() => { 24 this.$nextTick(() => {
25 this.$refs.search.focus(); 25 this.$refs.search.focus();
26 }); 26 });
@@ -28,7 +28,7 @@ export default {
28 if (event.key === "Escape") { 28 if (event.key === "Escape") {
29 this.$refs.search.value = ""; 29 this.$refs.search.value = "";
30 this.$refs.search.blur(); 30 this.$refs.search.blur();
31 this.$emit("search:cancel"); 31 this.$emit("search-cancel");
32 } 32 }
33 }; 33 };
34 document.addEventListener("keydown", this._keyListener.bind(this)); 34 document.addEventListener("keydown", this._keyListener.bind(this));