Before creating an issue...
Please don't file GitHub issues to ask questions. Use Stack Overflow with a #react-select tag
I think it's maybe a bug.
Please include a test case that demonstrates the issue you're reporting!
This is very helpful to maintainers in order to help us see the issue you're seeing.
To report bugs against react-select v2 please fork the following code-sandbox:
https://codesandbox.io/s/k5rvn9z3lv
To report bugs against react-select v1 please fork the following code-sandbox:
https://codesandbox.io/s/n34mq0743j
You may also find the online Babel tool quite helpful if you wish to use ES6/ES7 syntax not yet supported by the browser you are using.
Provide as much information as possible about your requested feature. Here are a few questions you may consider answering:
I simplified my use case in this codeSandbox demo, simply use a button to reset the form value.
I solve this problem by providing an option object {label: 'choose one', value: 0}, then I can reset form value to 0;
I found passing null instead of undefined fixed this.
its not working for me. my value is changed to null, undefined or even _blank_, the select component still has previous value.
Setting to null worked for me as well.
Most helpful comment
I found passing
nullinstead ofundefinedfixed this.