Skip to content

Feature Request: Make multi-select a HOC like Creatable rather than prop on Select? #4252

Closed
@dakur

Description

@dakur

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting-author-responseIssues or PRs waiting for more information from the author

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions