Closed
Description
Hi team,
Reproduction link (click button below)
Summary
Allow name
prop to be passed to <Select>
What is the bug?
You cannot pass name
prop to <Select>
Stackblitz code example: https://stackblitz.com/edit/react-ts-zfrvws?file=App.tsx
Motivation for Change
- maintain consistency with
<Input>
( https://github.com/react-component/input) which supports passingname
prop, which allows follows standard HTML behavior/expectations✅ <Input name="some_value" />. // input from https://github.com/react-component/input ✅ <input name="some_value" /> // regular input
- keep consistency with HTML standard, as
<select>
is allowed to have aname
attribute (Specification docs)❌ <Select name="some_value" />. // select from https://github.com/react-component/select ✅ <select name="some_value" /> // regular input element
What is the expected behavior?
- You should be able to pass
name
prop to<Select>
element. The namename
prop, should get passed down to theinput
element that gets rendered in the DOM.-
- i think we need to modify Input.tsx file so the
name
prop that is passed into<Select>
gets passed down to<Input>
?
- i think we need to modify Input.tsx file so the
-
Related
Metadata
Metadata
Assignees
Labels
No labels