diff --git a/src/components/select/select-head.vue b/src/components/select/select-head.vue index 4165e5f5..10004b8d 100644 --- a/src/components/select/select-head.vue +++ b/src/components/select/select-head.vue @@ -58,7 +58,7 @@ default: false }, initialLabel: { - type: String, + type: [String, Number, Array], }, values: { type: Array, diff --git a/src/components/select/select.vue b/src/components/select/select.vue index d426c545..8e177c06 100644 --- a/src/components/select/select.vue +++ b/src/components/select/select.vue @@ -351,7 +351,7 @@ }); }); } - + let hasDefaultSelected = slotOptions.some(option => this.query === option.key); for (let option of slotOptions) { const cOptions = option.componentOptions; @@ -375,11 +375,13 @@ if (cOptions.children.length > 0) selectOptions.push({...option}); } else { // ignore option if not passing filter - const optionPassesFilter = this.filterable ? this.validateOption(cOptions) : option; - if (!optionPassesFilter) continue; + if (!hasDefaultSelected) { + const optionPassesFilter = this.filterable ? this.validateOption(cOptions) : option; + if (!optionPassesFilter) continue; + } optionCounter = optionCounter + 1; - selectOptions.push(this.processOption(option, selectedValues, optionCounter === currentIndex)); + selectOptions.push(this.processOption(option, selectedValues, false)); } }