You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using React 15.0.1, controlled select elements with optgroup elements are not displaying (selecting) the value provided on initial render. See the following jsfiddle for a simple test case:
@mavisd I've been seeing the same behaviour in my React 15.0.1 app too.
For the moment I've been falling back to setting the selected attribute on the selected option tag (which does trigger the React warning about using the defaultValue or value on the select instead)
bind() is not necessary with React.createClass() as the methods are autobound. Also the code is identical but behaves differently in different versions, so it’s an indication that it might be React’s fault.
I think this is the same as #6440 and #6434, and was fixed in #6442. The fix is not out in 15.0.1, but it should get into the next patch release. I can confirm this working with the build from the master:
Using React 15.0.1, controlled select elements with optgroup elements are not displaying (selecting) the value provided on initial render. See the following jsfiddle for a simple test case:
https://jsfiddle.net/Artconnoisseur/eg3j7fam/1/
Here is another fiddle where it is working using React 0.14.8:
https://jsfiddle.net/Artconnoisseur/hfp8rf1j/1/
The text was updated successfully, but these errors were encountered: