We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 56d93bf + bc23214 commit f8f7780Copy full SHA for f8f7780
src/Select.vue
@@ -95,11 +95,18 @@ import coerceBoolean from './utils/coerceBoolean.js'
95
selectedItems() {
96
let foundItems = []
97
if (this.value.length) {
98
- for (let item in this.value) {
99
- if (typeof this.value[item] === "string") {
100
- foundItems.push(this.value[item])
+ this.value.forEach(item => {
+ if (typeof item === "string") {
+ let option
101
+ this.options.some(o => {
102
+ if(o.value === item) {
103
+ option = o
104
+ return true
105
+ }
106
+ })
107
+ option && foundItems.push(option.label)
108
}
- }
109
110
return foundItems.join(', ')
111
112
},
0 commit comments