fix(SelectMenu): take option-attribute into account to display label

Resolves #1151
This commit is contained in:
Benjamin Canac
2024-01-16 11:16:20 +01:00
parent e116f931b2
commit b9fe74bca5
2 changed files with 21 additions and 4 deletions

View File

@@ -13,7 +13,7 @@ const people = [{
name: 'Tom Cook'
}]
const selected = ref(people[0].name)
const selected = ref(people[0].id)
</script>
<template>
@@ -21,7 +21,7 @@ const selected = ref(people[0].name)
v-model="selected"
:options="people"
placeholder="Select people"
value-attribute="name"
value-attribute="id"
option-attribute="name"
/>
</template>