dillon1000/react
Commit
Browse files 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.
Changed paths2 files
First-parent comparisonsrc/renderers/dom/client/wrappers/__tests__/ReactDOMInput-test.js ModifiedM src/renderers/dom/shared/ReactDOMComponent.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…