Refactor #5435
parent
413efbb2f4
commit
71db0aea00
|
@ -777,7 +777,7 @@ export default {
|
||||||
isSelected(option) {
|
isSelected(option) {
|
||||||
const optionValue = this.getOptionValue(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() {
|
findFirstOptionIndex() {
|
||||||
return this.visibleOptions.findIndex((option) => this.isValidOption(option));
|
return this.visibleOptions.findIndex((option) => this.isValidOption(option));
|
||||||
|
|
Loading…
Reference in New Issue