Commit bef01c91c1afb23d113ebd2e1c99f9b2264ccdd8
1 parent
f0c9ece6
it will make a new bug, so revert
Showing
1 changed file
with
5 additions
and
8 deletions
Show diff stats
src/components/select/select.vue
... | ... | @@ -359,7 +359,7 @@ |
359 | 359 | /** |
360 | 360 | * Not sure why use hasDefaultSelected #4273 |
361 | 361 | * */ |
362 | - // let hasDefaultSelected = slotOptions.some(option => this.query === option.key); | |
362 | + let hasDefaultSelected = slotOptions.some(option => this.query === option.key); | |
363 | 363 | for (let option of slotOptions) { |
364 | 364 | |
365 | 365 | const cOptions = option.componentOptions; |
... | ... | @@ -383,13 +383,10 @@ |
383 | 383 | if (cOptions.children.length > 0) selectOptions.push({...option}); |
384 | 384 | } else { |
385 | 385 | // ignore option if not passing filter |
386 | - //if (!hasDefaultSelected) { | |
387 | - // const optionPassesFilter = this.filterable ? this.validateOption(cOptions) : option; | |
388 | - // if (!optionPassesFilter) continue; | |
389 | - //} | |
390 | - | |
391 | - const optionPassesFilter = this.filterable ? this.validateOption(cOptions) : option; | |
392 | - if (!optionPassesFilter) continue; | |
386 | + if (!hasDefaultSelected) { | |
387 | + const optionPassesFilter = this.filterable ? this.validateOption(cOptions) : option; | |
388 | + if (!optionPassesFilter) continue; | |
389 | + } | |
393 | 390 | |
394 | 391 | optionCounter = optionCounter + 1; |
395 | 392 | selectOptions.push(this.processOption(option, selectedValues, optionCounter === currentIndex)); | ... | ... |