Commit 1d8b4d1374889e7ba26cae27d717047d50f9bee5
1 parent
171bc082
fix #4371 close #4431
Showing
1 changed file
with
4 additions
and
3 deletions
Show diff stats
src/components/select/select.vue
@@ -374,13 +374,14 @@ | @@ -374,13 +374,14 @@ | ||
374 | ); | 374 | ); |
375 | } | 375 | } |
376 | 376 | ||
377 | - cOptions.children = children.map(opt => { | 377 | + // fix #4371 |
378 | + children = children.map(opt => { | ||
378 | optionCounter = optionCounter + 1; | 379 | optionCounter = optionCounter + 1; |
379 | return this.processOption(opt, selectedValues, optionCounter === currentIndex); | 380 | return this.processOption(opt, selectedValues, optionCounter === currentIndex); |
380 | }); | 381 | }); |
381 | 382 | ||
382 | - // keep the group if it still has children | ||
383 | - if (cOptions.children.length > 0) selectOptions.push({...option}); | 383 | + // keep the group if it still has children // fix #4371 |
384 | + if (children.length > 0) selectOptions.push({...option,componentOptions:{...cOptions,children:children}}); | ||
384 | } else { | 385 | } else { |
385 | // ignore option if not passing filter | 386 | // ignore option if not passing filter |
386 | if (this.filterQueryChange) { | 387 | if (this.filterQueryChange) { |