diff --git a/app/src/plugins/app/_components/w-autocomplete.vue b/app/src/plugins/app/_components/w-autocomplete.vue
index 608a4cb..e5f1c63 100644
--- a/app/src/plugins/app/_components/w-autocomplete.vue
+++ b/app/src/plugins/app/_components/w-autocomplete.vue
@@ -7,7 +7,7 @@
@keydown.enter="optionSelected()"
/>
-
+
{{ suggestion._suggestionHiddenPart }}
{{ suggestion._suggestionShownPart }}
@@ -36,7 +36,7 @@ export default {
const normalizedSearch = this._normalize(this.search)
if (!normalizedSearch.length || !this.options.length)
- return ''
+ return null
const filteredOptions = this.options.filter(option => {
const normalizedValue = this._normalize(option.value)
@@ -45,7 +45,7 @@ export default {
})
if (!filteredOptions[0])
- return ''
+ return null
const suggestion = {
...filteredOptions[0],
@@ -60,6 +60,9 @@ export default {
methods: {
optionSelected() {
+ if (!this.suggestion)
+ return
+
this.$emit('option-selected', this.suggestion)
this.search = ''
},