From f24dd5742f1846ac1ade5b8a2d451fa81cf9b8b3 Mon Sep 17 00:00:00 2001 From: mariana-furyk <58301139+mariana-furyk@users.noreply.github.com> Date: Wed, 22 Nov 2023 16:30:43 +0200 Subject: [PATCH] Fix [Projects] an attempt to delete / archive project redirects to project screen (#2092) --- src/elements/ActionMenuItem/ActionsMenuItem.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/elements/ActionMenuItem/ActionsMenuItem.js b/src/elements/ActionMenuItem/ActionsMenuItem.js index 7c940ea59..9125bb4ba 100644 --- a/src/elements/ActionMenuItem/ActionsMenuItem.js +++ b/src/elements/ActionMenuItem/ActionsMenuItem.js @@ -41,10 +41,10 @@ const ActionsMenuItem = ({ dataItem, index, isIconDisplayed, menuItem }) => { data-testid={`actions-menu__option-${index}`} className={menuClassNames} onClick={event => { + event.stopPropagation() + if (!menuItem.disabled) { menuItem.onClick(dataItem) - } else { - event.stopPropagation() } }} >