Skip to content

Commit

Permalink
fix: menu click
Browse files Browse the repository at this point in the history
  • Loading branch information
rpenido committed Oct 30, 2023
1 parent 3108b21 commit f6c8665
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/taxonomy/taxonomy-card/TaxonomyCardMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ const TaxonomyCardMenu = ({
const [menuIsOpen, setMenuIsOpen] = useState(false);
const [menuTarget, setMenuTarget] = useState(null);

const onClickItem = (menuName) => {
const onClickItem = (e, menuName) => {
e.preventDefault();
setMenuIsOpen(false);
onClickMenuItem(menuName);
};
Expand All @@ -42,7 +43,7 @@ const TaxonomyCardMenu = ({
onClose={() => setMenuIsOpen(false)}
>
<Menu data-testid={`taxonomy-card-menu-${id}`}>
<MenuItem className="taxonomy-menu-item" onClick={() => onClickItem('export')}>
<MenuItem className="taxonomy-menu-item" onClick={(e) => onClickItem(e, 'export')}>
{intl.formatMessage(messages.taxonomyCardExportMenu)}
</MenuItem>
</Menu>
Expand Down

0 comments on commit f6c8665

Please sign in to comment.