mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-23 20:23:08 +00:00
Reference select guide instead of documenting selected attribute (#3224)
Co-authored-by: 宋文强 <pwnn@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
860a510d38
commit
6a1e325098
@@ -56,7 +56,8 @@ The `onChange` event behaves as you would expect it to: whenever a form field is
|
||||
|
||||
### selected {#selected}
|
||||
|
||||
The `selected` attribute is supported by `<option>` components. You can use it to set whether the component is selected. This is useful for building controlled components.
|
||||
If you want to mark an `<option>` as selected, reference the value of that option in the `value` of its `<select>` instead.
|
||||
Check out ["The select Tag"](/docs/forms.html#the-select-tag) for detailed instructions.
|
||||
|
||||
### style {#style}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user