Skip to content

<select> fails to set a value when using <optgroup> (15.0 RC2) #6440

@trevorsmith

Description

@trevorsmith

React 0.14.8 correct sets the defaultValue for <select> when using <optgroup>:
https://jsfiddle.net/6v8cnowo/

However, 15.0 RC2 defaults to the first <option>:
https://jsfiddle.net/p2ctcgwj/1/

I'm not very familiar with the React codebase, but I suspect it has something to do with a change made in 1dca72e, specifically this line: https://github.com/facebook/react/blame/master/src/renderers/dom/client/wrappers/ReactDOMOption.js#L35

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions