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

React 15 warning about controlled inputs #21

Closed
ericgio opened this issue May 21, 2016 · 2 comments
Closed

React 15 warning about controlled inputs #21

ericgio opened this issue May 21, 2016 · 2 comments
Assignees

Comments

@ericgio
Copy link
Owner

ericgio commented May 21, 2016

"TypeaheadInput is changing a uncontrolled input of type text to be controlled. Input elements should not switch from uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://fb.me/react-controlled-components"

@ericgio ericgio self-assigned this May 21, 2016
@letthewookiewin
Copy link

The input element's value property need to be set to empty string, not undefined. _getHintText() and _getInputValue() are two places where undefined can be returned instead of a string.

See also: https://www.garysieling.com/blog/fixing-react-error-input-changing-controlled-input-type-text-uncontrolled

@ericgio
Copy link
Owner Author

ericgio commented Jun 14, 2016

Nice, thanks for the tip. Fixed in v0.5.3

@ericgio ericgio closed this as completed Jun 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants