dillon1000/react
Commit
Browse files Do not warn when a controlled input has `onInput` handler. (#18189)
`onInput` behaves the same as `onChange` for controlled inputs as far as I know, so React should not print the following warning when `onInput` is present. > Failed prop type: You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.
Changed paths2 files
First-parent comparisonpackages/react-dom/src/__tests__/ReactDOMInput-test.js ModifiedM packages/react-dom/src/shared/ReactControlledValuePropTypes.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…