mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Fixed #4944 - CascadeSelect: optionGroupChildren doesn't work in string type
This commit is contained in:
parent
ffb786f1b1
commit
573e4a0091
2 changed files with 5 additions and 2 deletions
|
@ -147,7 +147,7 @@ export default {
|
|||
return this.optionGroupLabel ? ObjectUtils.resolveFieldData(optionGroup, this.optionGroupLabel) : null;
|
||||
},
|
||||
getOptionGroupChildren(optionGroup, level) {
|
||||
return ObjectUtils.resolveFieldData(optionGroup, this.optionGroupChildren[level]);
|
||||
return ObjectUtils.isString(this.optionGroupChildren) ? ObjectUtils.resolveFieldData(optionGroup, this.optionGroupChildren) : ObjectUtils.resolveFieldData(optionGroup, this.optionGroupChildren[level]);
|
||||
},
|
||||
isOptionGroup(option, level) {
|
||||
return Object.prototype.hasOwnProperty.call(option, this.optionGroupChildren[level]);
|
||||
|
|
|
@ -73,7 +73,10 @@ export default {
|
|||
optionDisabled: null,
|
||||
optionGroupIcon: String,
|
||||
optionGroupLabel: String,
|
||||
optionGroupChildren: Array,
|
||||
optionGroupChildren: {
|
||||
type: [String, Array],
|
||||
default: null
|
||||
},
|
||||
activeOptionPath: Array,
|
||||
level: Number,
|
||||
templates: null,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue