diff --git a/public/plugins/vue/tt-components/tt-autocomplete.js b/public/plugins/vue/tt-components/tt-autocomplete.js index b77297973..c334d508f 100644 --- a/public/plugins/vue/tt-components/tt-autocomplete.js +++ b/public/plugins/vue/tt-components/tt-autocomplete.js @@ -114,6 +114,14 @@ Vue.component('tt-autocomplete', { } }, onInput() { + if (!this.apiUrl && this.items.length > 0) { + const lowerCaseInput = this.displayValue.toLowerCase(); + const matchingItem = this.items.find(item => item.value.toLowerCase() === lowerCaseInput); + if (matchingItem) { + this.selectSuggestion(matchingItem); + return; + } + } if (this.returnText) this.$emit('input', this.displayValue); this.fetchSuggestions(); },