question-mark
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.

Allow select All option in Multiselect

See original GitHub issue

will be nice if we have an option in multiselect - ALL pseudo code

if select ALL
     clear current selected items from select
else if Selected any other option
     clear All and set current value to this option
<select>
<option value=0>All</option>
<option value=1>test</option>
<option value=2>test2</option>
<option value=3>test3</option>
<option value=4>test4</option>
</select>

probably something like this will be useful: (add withAll={true})

<Select
               name="myselect"
               multi={true}
               value={this.state.data}
               options={this.state.opts}
               withAll={true}
           />

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:20
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

12reactions
AlexEscalantecommented, Aug 19, 2017
10reactions
esinonercommented, May 31, 2019

I inspired from Alex’s method, but i changed some section of his code. There is a example i prepared, if you still need, you can check.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bootstrap multiselect select all options at instanciation
You need to run both selectAll (with false as second parameter - this indicate that all values will be selected, even non-visible values)...
Read more >
How to customize value to Select All option in multiselect?
You can just compare the number of all <option> s in the select: $('#my-select').find('option').length , with the number of all selected options: $('#my-select...
Read more >
React Multi Select with Check boxes and Select All option
Give your users to select/deselect all options with a single click in react-multiselect-checkboxes ... We start by adding a dummy option {label: " ......
Read more >
Add a Select ALL option in multi select dropdown in PowerApps
in your video, you have a single selection dropdown. let's say you have a check box and when you select the All checkbox...
Read more >
Options - Multiple Select
Detail: Speed up keyboard use. Enter filter text and then hit enter or space will auto click select all and close the dropdown....
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found