From 1d8b4d1374889e7ba26cae27d717047d50f9bee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=81=8F?= Date: Sat, 29 Sep 2018 10:46:21 +0800 Subject: [PATCH] fix #4371 close #4431 --- src/components/select/select.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/select/select.vue b/src/components/select/select.vue index 6a7fa4bf..0acc3b66 100644 --- a/src/components/select/select.vue +++ b/src/components/select/select.vue @@ -374,13 +374,14 @@ ); } - cOptions.children = children.map(opt => { + // fix #4371 + children = children.map(opt => { optionCounter = optionCounter + 1; return this.processOption(opt, selectedValues, optionCounter === currentIndex); }); - // keep the group if it still has children - if (cOptions.children.length > 0) selectOptions.push({...option}); + // keep the group if it still has children // fix #4371 + if (children.length > 0) selectOptions.push({...option,componentOptions:{...cOptions,children:children}}); } else { // ignore option if not passing filter if (this.filterQueryChange) {