react-selectize
react-selectize copied to clipboard
SimpleSelect with name attribute and onValueChange prints warning on change
The warning :
Warning: ReactSelectize is changing an uncontrolled input of type hidden 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
JSX:
<SimpleSelect
name="thename"
options={this.state.opts}
value={this.state.value}
onValueChange={(value) => this.setState({value}) }/>
If I remove either the name or the onValueChange attribute, the warning disappears.
No response?
I got the same issue anyone ?
Specifying serialize
prop helped me.