Closed
Description
Thanks for maintaining react-select!
Currently, there is a problem with simple distinction between single and multi selects. I was wondering a lot why ValueType
contains null
type rather then just leaving an empty array when I was working on multiselect components. Then, from some issue I've understood that it is because of single selects which can be nullable.
But because of this I have to write [...(existingOptions === null ? [] : existingOptions), newOption]
in every onChange
listener. It causes also weird bugs like #3632.
I think that multi select functionality should be rather implemented as a higher-order component like Creatable rather than part of Select itself.