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

React uncontroller component being changed warning

Open jaischeema opened this issue 7 years ago • 2 comments

Hi,

I am noticed that with the search and custom highlighting, we have been seeing this 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. More info: https://fb.me/react-controlled-components

Is it a known thing or am I doing something wrong here?

jaischeema avatar Apr 26 '17 21:04 jaischeema

Having this issue too...

joevo2 avatar Aug 29 '17 02:08 joevo2

We should use serialize prop with empty string (not undefined as in docs)

serialize={(item) => !!item ? item.value : ''}

yekaterinashenets avatar Feb 06 '18 15:02 yekaterinashenets