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.

Dropdown doesn't close when I click outside the dropdown

See original GitHub issue

Hi when I show the dropdown menu and then click outside the region of dropdown it doesn’t close. Why?

Here is how I create it


 <Select name="fieldcombo"
               value={this.state.comboFieldValue}
               onChange={this.handleFieldComboChange.bind(this)}
               simpleValue
               openOnClick={false}                    
               clearable={true}
               options={selectData}
                />

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:25 (2 by maintainers)

github_iconTop GitHub Comments

9reactions
deniswvieiracommented, Mar 11, 2020

Same problem with “react-select”: “3.0.8”

6reactions
juliocarneirocommented, Jun 10, 2020

same problem with “react-select”: “3.0.8”

Read more comments on GitHub >

github_iconTop Results From Across the Web

Closing dropdown by clicking outside in Javascript (tutorial ...
The issue lies in shareVis function. Here document.getElementById("mySharedown").className = "show";. you are replacing #mySharedown class ...
Read more >
Dropdown with javascript and css won't close properly when ...
Dropdown with javascript and css won't close properly when clicking outside of it. ... Close the dropdown if the user clicks outside of...
Read more >
Angular Dropdown Menu Close On Click Outside
Here we used clickOutside directive and created clickOutside event which should close our dropdown. export class AppComponent { isMenuOpened: boolean = false; ...
Read more >
Bootstrap 4 prevent dropdown close click outside on Codeply
Bootstrap 4 prevent dropdown close click outside Codeply example.
Read more >
How to avoid dropdown menu to close menu items on clicking ...
The default behavior of a dropdown menu is to close the menu list items when clicked inside. In this article, We will use...
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