From e27b704af9841de18d2fce3ce4e284c64178c939 Mon Sep 17 00:00:00 2001 From: 梁灏 Date: Tue, 18 Sep 2018 16:22:46 +0800 Subject: [PATCH] fixed #4273 --- src/components/select/select.vue | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/components/select/select.vue b/src/components/select/select.vue index 3857089..6ee4814 100644 --- a/src/components/select/select.vue +++ b/src/components/select/select.vue @@ -356,7 +356,10 @@ }); }); } - let hasDefaultSelected = slotOptions.some(option => this.query === option.key); + /** + * Not sure why use hasDefaultSelected #4273 + * */ + // let hasDefaultSelected = slotOptions.some(option => this.query === option.key); for (let option of slotOptions) { const cOptions = option.componentOptions; @@ -380,10 +383,13 @@ if (cOptions.children.length > 0) selectOptions.push({...option}); } else { // ignore option if not passing filter - if (!hasDefaultSelected) { - const optionPassesFilter = this.filterable ? this.validateOption(cOptions) : option; - if (!optionPassesFilter) continue; - } + //if (!hasDefaultSelected) { + // const optionPassesFilter = this.filterable ? this.validateOption(cOptions) : option; + // if (!optionPassesFilter) continue; + //} + + const optionPassesFilter = this.filterable ? this.validateOption(cOptions) : option; + if (!optionPassesFilter) continue; optionCounter = optionCounter + 1; selectOptions.push(this.processOption(option, selectedValues, optionCounter === currentIndex)); -- libgit2 0.21.4