Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<select> tag in react accepts attributes 'value' and 'defaultValue' #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

grepsuzette
Copy link
Contributor

https://reactjs.org/docs/forms.html#the-select-tag

React will show a warning if using

@grepsuzette
Copy link
Contributor Author

grepsuzette commented Jan 23, 2022

Hold on, the above works but according to the doc an Array is ok too:

You can pass an array into the value attribute, allowing you to select multiple options in a select tag:
<select multiple={true} value={['B', 'C']}>

I am unsure how to type that. If any suggestion...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant