furqanZafar / react-selectize

http://furqanzafar.github.io/react-selectize/
Apache License 2.0
704 stars 138 forks source link

SimpleSelect with name attribute and onValueChange prints warning on change #107

Open wyozi opened 8 years ago

wyozi commented 8 years ago

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.

pixeldrew commented 7 years ago

No response?

klaussa commented 7 years ago

I got the same issue anyone ?

takaando-dtc commented 7 years ago

Specifying serialize prop helped me.