Skip to content

Commit cd47bc3

Browse files
committed
fix: click handler for disabled option
1 parent 93c60f9 commit cd47bc3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Shared/Components/ActionMenu/ActionMenuOption.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ const ActionMenuOption = ({ option, onClick, disableDescriptionEllipsis }: Actio
1616
<div
1717
// Intentionally added margin to the left and right to have the gap on the edges of the options
1818
className={`flex left dc__gap-8 ${description ? 'top' : ''} py-6 px-8 ${isDisabled ? 'dc__disabled' : 'cursor'} ${isNegativeType ? 'dc__hover-r50' : 'dc__hover-n50'} mr-4 ml-4 br-4 action-menu__option`}
19-
onClick={handleClick}
19+
onClick={!isDisabled ? handleClick : undefined}
20+
aria-disabled={isDisabled}
2021
>
2122
{startIcon && <div className={`${iconBaseClass} mt-2`}>{startIcon}</div>}
2223
<div className="flex-grow-1">

0 commit comments

Comments
 (0)