Skip to content

Commit

Permalink
fix(select-menu): fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
jbaubree committed Dec 1, 2023
1 parent 14b6e41 commit 59c7074
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
11 changes: 1 addition & 10 deletions playground/src/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -274,16 +274,7 @@ const date = ref()
</div>
<UTextarea v-model="textArea" placeholder="I am a textarea" />
<USelectMenu v-model="selected" :options="people" option-attribute="name" is-creatable searchable />
<USelectMenu
v-model="selected"
:options="people"

option-attribute="name"
value-attribute="id"

is-creatable searchable is-multiple
:formatter="(a) => people.find(p => p.id === a)?.name"
/>
<USelectMenu v-model="selected" :options="people" option-attribute="name" value-attribute="id" is-creatable searchable is-multiple :formatter="(a) => people.find(p => p.id === a)?.name" />
<div>
<URadio v-for="method of methods" :key="method.name" v-model="radio" v-bind="method" />
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/select/USelectMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ watch(container, value => value ? emit('open') : emit('close'))
<slot name="label">
<div
v-if="isMultiple && Array.isArray(modelValue) && modelValue.length"
class="space-x-1"
class="space-x-1 space-y-1"
>
<UTag v-for="selected, index in modelValue" :key="index" color="pilot" class="gap-1">
{{ valueAttribute ? formatter(selected, optionAttribute) : selected.name }}
Expand Down

0 comments on commit 59c7074

Please sign in to comment.