dillon1000/react

Commit

Default to first non-disabled option for select elements (#10456)

* Default to first non-disabled option for select

Instead of defaulting to the first option for a select element, which could be a disabled option, we find the first non-disabled option available while we looping through the options. If no option matches, set the first non-disabled option as selected.

* Add ReactDOMSelect test for defaulting to non-disabled options

* Add test fixtures to cover disabled selected options

* Fix bad merge
Browse files
Changed paths6 files
First-parent comparison
A fixtures/dom/src/components/IssueList.js AddedM fixtures/dom/src/components/TestCase.js ModifiedM fixtures/dom/src/components/fixtures/selects/index.js ModifiedM fixtures/dom/src/style.css ModifiedM src/renderers/dom/fiber/wrappers/ReactDOMFiberSelect.js ModifiedM src/renderers/dom/shared/wrappers/__tests__/ReactDOMSelect-test.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…