Commit 902a2cf595a1df2d09eff9fcb41f637e88ff5919
1 parent
147f23a5
fix
Showing
1 changed file
with
2 additions
and
7 deletions
Show diff stats
src/components/select/select.vue
| @@ -355,14 +355,12 @@ | @@ -355,14 +355,12 @@ | ||
| 355 | }); | 355 | }); |
| 356 | }); | 356 | }); |
| 357 | } | 357 | } |
| 358 | - let hasDefaultSelected = slotOptions.some(option => this.query === option.key); | ||
| 359 | for (let option of slotOptions) { | 358 | for (let option of slotOptions) { |
| 360 | 359 | ||
| 361 | const cOptions = option.componentOptions; | 360 | const cOptions = option.componentOptions; |
| 362 | if (!cOptions) continue; | 361 | if (!cOptions) continue; |
| 363 | if (cOptions.tag.match(optionGroupRegexp)){ | 362 | if (cOptions.tag.match(optionGroupRegexp)){ |
| 364 | let children = cOptions.children; | 363 | let children = cOptions.children; |
| 365 | - | ||
| 366 | // remove filtered children | 364 | // remove filtered children |
| 367 | if (this.filterable){ | 365 | if (this.filterable){ |
| 368 | children = children.filter( | 366 | children = children.filter( |
| @@ -379,11 +377,8 @@ | @@ -379,11 +377,8 @@ | ||
| 379 | if (cOptions.children.length > 0) selectOptions.push({...option}); | 377 | if (cOptions.children.length > 0) selectOptions.push({...option}); |
| 380 | } else { | 378 | } else { |
| 381 | // ignore option if not passing filter | 379 | // ignore option if not passing filter |
| 382 | - if (!hasDefaultSelected) { | ||
| 383 | - const optionPassesFilter = this.filterable ? this.validateOption(cOptions) : option; | ||
| 384 | - if (!optionPassesFilter) continue; | ||
| 385 | - } | ||
| 386 | - | 380 | + const optionPassesFilter = this.filterable ? this.validateOption(cOptions) : option; |
| 381 | + if (!optionPassesFilter) continue; | ||
| 387 | optionCounter = optionCounter + 1; | 382 | optionCounter = optionCounter + 1; |
| 388 | selectOptions.push(this.processOption(option, selectedValues, optionCounter === currentIndex)); | 383 | selectOptions.push(this.processOption(option, selectedValues, optionCounter === currentIndex)); |
| 389 | } | 384 | } |