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;
|
return this.optionGroupLabel ? ObjectUtils.resolveFieldData(optionGroup, this.optionGroupLabel) : null;
|
||||||
},
|
},
|
||||||
getOptionGroupChildren(optionGroup, level) {
|
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) {
|
isOptionGroup(option, level) {
|
||||||
return Object.prototype.hasOwnProperty.call(option, this.optionGroupChildren[level]);
|
return Object.prototype.hasOwnProperty.call(option, this.optionGroupChildren[level]);
|
||||||
|
|
|
@ -73,7 +73,10 @@ export default {
|
||||||
optionDisabled: null,
|
optionDisabled: null,
|
||||||
optionGroupIcon: String,
|
optionGroupIcon: String,
|
||||||
optionGroupLabel: String,
|
optionGroupLabel: String,
|
||||||
optionGroupChildren: Array,
|
optionGroupChildren: {
|
||||||
|
type: [String, Array],
|
||||||
|
default: null
|
||||||
|
},
|
||||||
activeOptionPath: Array,
|
activeOptionPath: Array,
|
||||||
level: Number,
|
level: Number,
|
||||||
templates: null,
|
templates: null,
|
||||||
|
|
Loading…
Reference in New Issue