Autowhatever is changing an uncontrolled input of type text to be controlled
Autowhatever is changing an 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
I'm getting the same error. This happens when I choose a suggestion from the list of suggestions.
I found a solution for this. I added a typeof check within the onChange method (inputProps) to prevent state.value from being 'undefined' (which seems to cause this error):
handleChange(event) {
const value = event.target.value;
if(typeof value !== 'undefined') {
this.setState({
value
});
}
}
Sounds like an issue with Autowhatever.
Could you please make sure the issue is reproducible in the latest version of react-autowhatever, and create an issue there?