mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-07 07:12:23 +03:00
Merge branch 'fix_for_issue_671' of https://github.com/totola-clx/vue-select into totola-clx-fix_for_issue_671
# Conflicts: # src/components/Select.vue
This commit is contained in:
@@ -915,15 +915,12 @@
|
||||
* @return {Boolean} True when selected | False otherwise
|
||||
*/
|
||||
isOptionSelected(option) {
|
||||
let selected = false
|
||||
this.valueAsArray.forEach(value => {
|
||||
if (typeof value === 'object' && this.optionObjectComparator(value, option)) {
|
||||
selected = true
|
||||
} else if (value === option || value === option[this.index]) {
|
||||
selected = true
|
||||
}
|
||||
})
|
||||
return selected
|
||||
return this.valueAsArray.some(value => {
|
||||
if (typeof value === 'object') {
|
||||
return this.optionObjectComparator(value, option)
|
||||
}
|
||||
return value === option || value === option[this.index]
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user