Skip to content

Commit 89912ab

Browse files
committed
selected items label should be shown in button content
1 parent 4e426ac commit 89912ab

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Select.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,14 @@ import coerceBoolean from './utils/coerceBoolean.js'
9797
if (this.value.length) {
9898
for (let item in this.value) {
9999
if (typeof this.value[item] === "string") {
100-
foundItems.push(this.value[item])
100+
let option
101+
this.options.some(o => {
102+
if(o.value === this.value[item]) {
103+
option = o
104+
return true
105+
}
106+
})
107+
option && foundItems.push(option.label)
101108
}
102109
}
103110
return foundItems.join(', ')

0 commit comments

Comments
 (0)