-
-
Notifications
You must be signed in to change notification settings - Fork 458
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
value
attribute in DOM for <Select>
element is not updating after selecting a dropdown item
#791
Comments
value
attribute in DOM for <Select>
element is not updating after selecting a dropdown item
The rendered HTML of CleanShot.2022-07-13.at.06.20.07.mp4 |
|
Hey @afc163, I started thinking more about a backwards compatible approach towards having |
Reproduction link
Steps to reproduce
1.Choose a dropdown item from the
<Select>
element and observe that thevalue
attribute of the<input>
element associated with the<Select>
in the DOM does not get updated with the value that was selected ↓Live Example:
A strange behavior I observed is that if you type into the
<Select>
input box, it will update thevalue
attribute of the<input
> element associated with the<Select>
but as soon as you select an item from the dropdown thevalue
attribute clears (see video above ↑)What is expected?
value
attribute on the<input>
element in the DOM.defaultValue="some_value"
on the<Select>
should addvalue="some_value"
on the underlying<input>
element that gets rendered in the DOM.value
prop gets updated on changes?Why is this important?
If you are submitting a
<form>
the form will not be able to detect that the our<Select>
element has value set on it becausevalue
attribute of the<input>
in the DOM has not been updatedThe text was updated successfully, but these errors were encountered: