dillon1000/react
Commit
Browse files Don't set the first option as selected in select tag with `size` attribute (#14242)
* Set 'size' attribute to select tag if it occurs before appending options * Add comment about why size is assigned on select create. Tests I added some more clarification for why size must be set on select element creation: - In the source code - In the DOM test fixture - In a unit test * Use let, not const in select tag stub assignment
Changed paths3 files
First-parent comparisonfixtures/dom/src/components/fixtures/selects/index.js ModifiedM packages/react-dom/src/__tests__/ReactDOMSelect-test.js ModifiedM packages/react-dom/src/client/ReactDOMComponent.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…