Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn if a falsy value prop is provided without an onChange #9508

Closed
wants to merge 3 commits into from

Conversation

Hypnosphi
Copy link
Contributor

React warns when a controlled form filed lacks onChange handler, because this makes the field effectively readonly. Unfortunately, when the value is falsy ("", 0, or false), no such warning is arised. This PR is indended to fix it.

…hange` handler or an explicit `readOnly` flag
@gaearon
Copy link
Collaborator

gaearon commented Aug 2, 2018

Sorry we missed this PR :-/
We ended up merging an equivalent in #12628.

@gaearon gaearon closed this Aug 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants