Skip to content

Commit

Permalink
fix: dropdown: fix on click outside getting triggered on portaled dro…
Browse files Browse the repository at this point in the history
…pdowns
  • Loading branch information
ychhabra-eightfold committed Sep 3, 2022
1 parent 931b2a8 commit 2f23be5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/Dropdown/Dropdown.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ const dropdownArgs: Object = {
positionStrategy: 'absolute',
disabled: false,
closeOnDropdownClick: true,
portal: false,
};

Dropdown_Button.args = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Dropdown/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export const Dropdown: FC<DropdownProps> = React.memo(
};

useOnClickOutside(
refs.reference,
refs.floating,
(e) => {
if (closeOnOutsideClick) {
toggle(false)(e);
Expand Down

0 comments on commit 2f23be5

Please sign in to comment.