Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Commit

Permalink
fix: dropdown options events (#2475)
Browse files Browse the repository at this point in the history
  • Loading branch information
goga-m committed Jul 15, 2020
1 parent 3fa334f commit f619bf4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/components/Dropdown/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const renderOptions = (options: any[], onSelect: any) => (
data-testid={`dropdown__option--${key}`}
onClick={(e: any) => {
onSelect(option);
e.preventDefault();
e.stopPropagation();
}}
>
Expand Down Expand Up @@ -93,6 +94,7 @@ export const Dropdown = ({

const toggle = (e: any) => {
setIsOpen(!isOpen);
e.preventDefault();
e.stopPropagation();
};
const hide = () => setIsOpen(false);
Expand Down

0 comments on commit f619bf4

Please sign in to comment.