fix
This commit is contained in:
parent
147f23a50b
commit
902a2cf595
1 changed files with 2 additions and 7 deletions
|
@ -355,14 +355,12 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
let hasDefaultSelected = slotOptions.some(option => this.query === option.key);
|
|
||||||
for (let option of slotOptions) {
|
for (let option of slotOptions) {
|
||||||
|
|
||||||
const cOptions = option.componentOptions;
|
const cOptions = option.componentOptions;
|
||||||
if (!cOptions) continue;
|
if (!cOptions) continue;
|
||||||
if (cOptions.tag.match(optionGroupRegexp)){
|
if (cOptions.tag.match(optionGroupRegexp)){
|
||||||
let children = cOptions.children;
|
let children = cOptions.children;
|
||||||
|
|
||||||
// remove filtered children
|
// remove filtered children
|
||||||
if (this.filterable){
|
if (this.filterable){
|
||||||
children = children.filter(
|
children = children.filter(
|
||||||
|
@ -379,11 +377,8 @@
|
||||||
if (cOptions.children.length > 0) selectOptions.push({...option});
|
if (cOptions.children.length > 0) selectOptions.push({...option});
|
||||||
} else {
|
} else {
|
||||||
// ignore option if not passing filter
|
// ignore option if not passing filter
|
||||||
if (!hasDefaultSelected) {
|
|
||||||
const optionPassesFilter = this.filterable ? this.validateOption(cOptions) : option;
|
const optionPassesFilter = this.filterable ? this.validateOption(cOptions) : option;
|
||||||
if (!optionPassesFilter) continue;
|
if (!optionPassesFilter) continue;
|
||||||
}
|
|
||||||
|
|
||||||
optionCounter = optionCounter + 1;
|
optionCounter = optionCounter + 1;
|
||||||
selectOptions.push(this.processOption(option, selectedValues, optionCounter === currentIndex));
|
selectOptions.push(this.processOption(option, selectedValues, optionCounter === currentIndex));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue