Skip to content

Commit 97da6c6

Browse files
committed
chore(SelectMenu): add required input only when needed
1 parent 6d9e4d4 commit 97da6c6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/runtime/components/forms/SelectMenu.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,14 @@
1111
:class="ui.wrapper"
1212
@update:model-value="onUpdate"
1313
>
14-
<input :value="modelValue" :required="required" class="absolute inset-0 w-px opacity-0 cursor-default" tabindex="-1" aria-hidden="true">
14+
<input
15+
v-if="required"
16+
:value="modelValue"
17+
:required="required"
18+
class="absolute inset-0 w-px opacity-0 cursor-default"
19+
tabindex="-1"
20+
aria-hidden="true"
21+
>
1522

1623
<component
1724
:is="searchable ? 'ComboboxButton' : 'ListboxButton'"

0 commit comments

Comments
 (0)