This commit is contained in:
梁灏 2018-09-29 10:46:21 +08:00
parent 171bc082f7
commit 1d8b4d1374

View file

@ -374,13 +374,14 @@
);
}
cOptions.children = children.map(opt => {
// fix #4371
children = children.map(opt => {
optionCounter = optionCounter + 1;
return this.processOption(opt, selectedValues, optionCounter === currentIndex);
});
// keep the group if it still has children
if (cOptions.children.length > 0) selectOptions.push({...option});
// keep the group if it still has children // fix #4371
if (children.length > 0) selectOptions.push({...option,componentOptions:{...cOptions,children:children}});
} else {
// ignore option if not passing filter
if (this.filterQueryChange) {