mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Merge branch 'master' into v4
This commit is contained in:
commit
5a6e010794
12 changed files with 34 additions and 19 deletions
|
@ -777,8 +777,13 @@ export default {
|
|||
isValidSelectedOption(option) {
|
||||
return this.isValidOption(option) && this.isSelected(option);
|
||||
},
|
||||
isEquals(value1, value2) {
|
||||
return ObjectUtils.equals(value1, value2, this.equalityKey);
|
||||
},
|
||||
isSelected(option) {
|
||||
return ObjectUtils.equals(this.modelValue, this.getOptionValue(option), this.equalityKey);
|
||||
const optionValue = this.getOptionValue(option);
|
||||
|
||||
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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue