react-selectize icon indicating copy to clipboard operation
react-selectize copied to clipboard

SimpleSelect with name attribute and onValueChange prints warning on change

Open wyozi opened this issue 7 years ago • 3 comments

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.

wyozi avatar Aug 31 '16 15:08 wyozi

No response?

pixeldrew avatar Jan 19 '17 22:01 pixeldrew

I got the same issue anyone ?

klaussa avatar Jan 21 '17 01:01 klaussa

Specifying serialize prop helped me.

takaando-dtc avatar Jan 25 '17 11:01 takaando-dtc