#2512: Update search suggestions on input (#2567)

* #2512: Update visible data list on input

* #2512: Remove excessive visible data list update on input
This commit is contained in:
Malik 2022-09-13 06:18:05 +02:00 committed by GitHub
parent a69cbd3b55
commit c1ff6587ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -87,6 +87,13 @@ export default Vue.extend({
return this.inputData.length > 0
}
},
watch: {
dataList(val, oldVal) {
if (val !== oldVal) {
this.updateVisibleDataList()
}
}
},
mounted: function () {
this.id = this._uid
this.inputData = this.value
@ -109,7 +116,6 @@ export default Vue.extend({
this.searchState.selectedOption !== -1 &&
this.inputData === this.visibleDataList[this.searchState.selectedOption]) { return }
this.handleActionIconChange()
this.updateVisibleDataList()
this.$emit('input', val)
},