Commit e27b704af9841de18d2fce3ce4e284c64178c939
1 parent
c1a2d95f
fixed #4273
Showing
1 changed file
with
11 additions
and
5 deletions
Show diff stats
src/components/select/select.vue
@@ -356,7 +356,10 @@ | @@ -356,7 +356,10 @@ | ||
356 | }); | 356 | }); |
357 | }); | 357 | }); |
358 | } | 358 | } |
359 | - let hasDefaultSelected = slotOptions.some(option => this.query === option.key); | 359 | + /** |
360 | + * Not sure why use hasDefaultSelected #4273 | ||
361 | + * */ | ||
362 | + // let hasDefaultSelected = slotOptions.some(option => this.query === option.key); | ||
360 | for (let option of slotOptions) { | 363 | for (let option of slotOptions) { |
361 | 364 | ||
362 | const cOptions = option.componentOptions; | 365 | const cOptions = option.componentOptions; |
@@ -380,10 +383,13 @@ | @@ -380,10 +383,13 @@ | ||
380 | if (cOptions.children.length > 0) selectOptions.push({...option}); | 383 | if (cOptions.children.length > 0) selectOptions.push({...option}); |
381 | } else { | 384 | } else { |
382 | // ignore option if not passing filter | 385 | // ignore option if not passing filter |
383 | - if (!hasDefaultSelected) { | ||
384 | - const optionPassesFilter = this.filterable ? this.validateOption(cOptions) : option; | ||
385 | - if (!optionPassesFilter) continue; | ||
386 | - } | 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; | ||
387 | 393 | ||
388 | optionCounter = optionCounter + 1; | 394 | optionCounter = optionCounter + 1; |
389 | selectOptions.push(this.processOption(option, selectedValues, optionCounter === currentIndex)); | 395 | selectOptions.push(this.processOption(option, selectedValues, optionCounter === currentIndex)); |