dillon1000/react

Commit

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`.
Browse files
Changed paths2 files
First-parent comparison
M packages/react-dom/src/__tests__/ReactDOMInput-test.js ModifiedM packages/react-dom/src/shared/ReactControlledValuePropTypes.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…