From 902a2cf595a1df2d09eff9fcb41f637e88ff5919 Mon Sep 17 00:00:00 2001 From: vincentfintend Date: Mon, 27 Aug 2018 16:08:13 +0800 Subject: [PATCH] fix --- src/components/select/select.vue | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/components/select/select.vue b/src/components/select/select.vue index 306376d..012fb93 100644 --- a/src/components/select/select.vue +++ b/src/components/select/select.vue @@ -355,14 +355,12 @@ }); }); } - let hasDefaultSelected = slotOptions.some(option => this.query === option.key); for (let option of slotOptions) { const cOptions = option.componentOptions; if (!cOptions) continue; if (cOptions.tag.match(optionGroupRegexp)){ let children = cOptions.children; - // remove filtered children if (this.filterable){ children = children.filter( @@ -379,11 +377,8 @@ 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; - } - + 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