Merge branch 'tt-autocomplete/fix' into 'master'

fixed issue

See merge request fronk/thetool!1641
This commit is contained in:
Luca Haid
2025-08-18 07:51:48 +00:00

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