fixed issue

This commit is contained in:
Luca Haid
2025-08-18 09:51:37 +02:00
parent bba4215dc0
commit 7ca089e710

View File

@@ -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();
},