dillon1000/react

Commit

Avoid validation warning when inputs change type (#7333)

For controlled inputs, `updateWrapper` was getting called before the
`type` prop had a chance to update. This could lead to a case where
switching from the `text` to `number` type caused a validation error
that would prevent the proper input value from being assigned.

This commit moves the call to `ReactDOMInput.updateWrapper` below
`_updateProperties` to avoid this situation.
Browse files
Changed paths2 files
First-parent comparison
M src/renderers/dom/client/wrappers/__tests__/ReactDOMInput-test.js ModifiedM src/renderers/dom/shared/ReactDOMComponent.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…