Skip to content

Commit 172ea67

Browse files
authored
fix(Select): normalize hidden control (#2572) (#2573)
Normalize SelectRoot to conditionally render BubbleSelect based on isFormControl and name, consistent with other form controls.
1 parent 445ddb3 commit 172ea67

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

packages/core/src/Select/Select.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ describe('given Select in a form', async () => {
255255
const wrapper = mount({
256256
props: ['handleSubmit'],
257257
components: { Select },
258-
template: '<form @submit="handleSubmit"><Select value="true" /></form>',
258+
template: '<form @submit="handleSubmit"><Select name="test" value="true" /></form>',
259259
}, {
260260
props: { handleSubmit },
261261
attachTo: document.body,

packages/core/src/Select/SelectRoot.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ provideSelectRootContext({
201201
/>
202202

203203
<BubbleSelect
204-
v-if="isFormControl"
204+
v-if="isFormControl && name"
205205
:key="nativeSelectKey"
206206
aria-hidden="true"
207207
tabindex="-1"

0 commit comments

Comments
 (0)