Fixed #4944 - CascadeSelect: optionGroupChildren doesn't work in string type
parent
ffb786f1b1
commit
573e4a0091
|
@ -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…
Reference in New Issue