Skip to content

Commit bbb9560

Browse files
🐛 close dropdown on outside click
1 parent 1caae76 commit bbb9560

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-multi-select-component",
3-
"version": "3.0.0",
3+
"version": "3.0.1",
44
"description": "Simple and lightweight multiple selection dropdown component with checkboxes, search and select-all",
55
"author": "Harsh Zalavadiya",
66
"license": "MIT",

src/multi-select/dropdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ const Dropdown = ({
112112
const handleFocus = () => !hasFocus && setHasFocus(true);
113113

114114
const handleBlur = (e) => {
115-
if (!e.relatedTarget) {
115+
if (!e.currentTarget.contains(e.relatedTarget)) {
116116
setHasFocus(false);
117117
setExpanded(false);
118118
}

0 commit comments

Comments
 (0)