From 71db0aea0030a0d389d45d41fb1cf434abdee67a Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Tue, 19 Mar 2024 17:18:17 +0300 Subject: [PATCH] Refactor #5435 --- components/lib/autocomplete/AutoComplete.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/lib/autocomplete/AutoComplete.vue b/components/lib/autocomplete/AutoComplete.vue index 64ec56ef5..0f79b35af 100755 --- a/components/lib/autocomplete/AutoComplete.vue +++ b/components/lib/autocomplete/AutoComplete.vue @@ -777,7 +777,7 @@ export default { isSelected(option) { const optionValue = this.getOptionValue(option); - return (this.modelValue || []).some((value) => this.isEquals(value, optionValue)); + return this.multiple ? (this.modelValue || []).some((value) => this.isEquals(value, optionValue)) : this.isEquals(this.modelValue, this.getOptionValue(option)); }, findFirstOptionIndex() { return this.visibleOptions.findIndex((option) => this.isValidOption(option));