From 85ae6d9e5e4c0875146d96d0b64612561610a4dc Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Mon, 11 Dec 2023 11:20:36 +0300 Subject: [PATCH] Fixed #3379 - AutoComplete: Duplicate Value --- components/lib/autocomplete/AutoComplete.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/lib/autocomplete/AutoComplete.vue b/components/lib/autocomplete/AutoComplete.vue index 0c57cb09f..374a111f0 100755 --- a/components/lib/autocomplete/AutoComplete.vue +++ b/components/lib/autocomplete/AutoComplete.vue @@ -424,7 +424,8 @@ export default { if (this.forceSelection) { let valid = false; - if (this.visibleOptions) { + // when forceSelection is on, prevent called twice onOptionSelect() + if (this.visibleOptions && !this.multiple) { const matchedValue = this.visibleOptions.find((option) => this.isOptionMatched(option, this.$refs.focusInput.value || '')); if (matchedValue !== undefined) {