Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8

github_iconTop GitHub Comments

dakurcommented, Mar 3, 2021

It looks like it works, but I can not say it sure, because I have ton of problems with types after upgrading. So I will rather wait for rewrite to TS which ensures there are correct type definitions and proper documentation of the type system so that I can be sure the problem is on my side. 🙂

dakurcommented, Feb 11, 2021

Hi guys, thanks for answering and for your work. I’ll try to upgrade to latest version soon and see what it looks like now. I did not see the code for a while so I can not say right now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced - React Select
A flexible and beautiful Select Input control for ReactJS with multiselect, autocomplete and ajax support.
Read more >
react-select-plus-delete - npm package - Snyk
Select Props ; menuStyle, object, undefined, optional style to apply to the menu ; multi, boolean, undefined, multi-value input.
Read more >
Parameters | Query and analyze data - Mode Support
The options list for a Select or Multiselect parameter can be defined dynamically from the results of a SQL query within a report....
Read more >
Creating Wijmo Controls: The Multi-Select Box - GrapeCity
We hope it inspires you to create your own Wijmo controls. It's really easy! ... These features may be added later if users...
Read more >
Create and customize a single and multi-select dropdown with ...
Instead of reinventing the wheel, it's worth to use a well-tested, battle-proven solution like React Select. In this lesson we are going to ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found