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
Since upgrading to React 15.0.1, when rendering <select> with optgroups, the value is not set on the DOM correctly. The first option will always get picked.
// Renders with "Yes" selected, I expect "Maybe"<selectvalue={3}><optgrouplabel="One"><optionvalue={1}>Yes</option></optgroup><optgrouplabel="Two"><optionvalue={2}>No</option></optgroup><optgrouplabel="Three"><optionvalue={3}>Maybe</option></optgroup></select>
Hi, thanks for reporting. This is a duplicate of #6547 and two other issues linked from there. It is fixed in master but this fix hasn't gotten into a release yet. Let's keep this open so people don't file more issues.
@gaearon We generally close out issues when things have been merged into master. The reason is that otherwise, it's too hard to tell what is still an active item (needs to be fixed) verses things that are already fixed and remain open only to help people find them. You could read through all the comments, but that takes time (especially if you're going through a bunch of them) and they are often nuanced with regards to remaining action items. You don't want to read through an hour of comments, only to discover that the whole thing is fixed and no longer relevant.
Uh oh!
There was an error while loading. Please reload this page.
Since upgrading to React 15.0.1, when rendering
<select>
with optgroups, the value is not set on the DOM correctly. The first option will always get picked.Examples
React 15.0.1 Fiddle (broken)
React 0.14.7 Fiddle (works)
React 15.0.1 without optgroup Fiddle (works)
Environment
OS X 10.11.4
Safari Version 9.1 (11601.5.17.1)
Chrome Version 49.0.2623.110 (64-bit)
Firefox 45.0.1
Edit: I also noticed that the same behavior occurs when using
defaultValue
.The text was updated successfully, but these errors were encountered: