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.

When using multi select , the drop down shows No-Options after selecting a value

See original GitHub issue

In Multi-Select version, when a value is selected, nothing shows in the drop down. I see No Options. When no value is selected, I see some options. My code is straight from the docs:


import Select from 'react-select';
import { colourOptions } from './data';

class Search extends React.Component {
   
    render(){
        return (
            <Select
                defaultValue={[colourOptions[2], colourOptions[3]]}
                isMulti
                name="colors"
                options={colourOptions}
                className="basic-multi-select"
                classNamePrefix="select"
            />
        );
        
    }
}

export default Search
 

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:12
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

17reactions
xnartcommented, Oct 23, 2018

Check if your colourOptions similar as this :

export const colourOptions = [
  { value: 'ocean', label: 'Ocean },
  { value: 'blue', label: 'Blue' }
];

An option must have value key.

13reactions
williamluke4commented, Mar 1, 2019

@xnart Is correct either ensure that all options have a value key or use the getOptionValue prop

Read more comments on GitHub >

github_iconTop Results From Across the Web

Javascript Bootstrap Multiselect - Show search dropdown if no ...
A possible solution is to add an element to the multiselect and then hide the list item
Read more >
Should selected options be removed from single- and multi ...
My question now is: Should the option(s) the user has already selected (a) still be shown and highlighted in the list or should...
Read more >
Virtual Select
A javascript plugin for dropdown with virtual scroll. ... Select multiple values ... Tooltip would be used to show selected values and options...
Read more >
Bootstrap Multiselect Examples - CodeHim
When using selectedClass , the selected classes are also applied on the option groups. ... A callback called after the dropdown has been...
Read more >
Select | Quasar Framework
Hides dropdown icon. fill-input. : Boolean. Description. Fills the input with current value; Useful along with 'hide-selected'; Does NOT works along with ......
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