Merge branch 'tt-autocomplete/fix' into 'master'
fixed issue See merge request fronk/thetool!1641
This commit is contained in:
@@ -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();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user