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

Commit

Permalink
Merge pull request #110 from cisagov/bugfix/close-show-hide-menu-with…
Browse files Browse the repository at this point in the history
…-dialog

Close the QuickMetaPopoverButtonMenu when ToggleHiddenDialog is closed
  • Loading branch information
sang2925 authored Mar 28, 2023
2 parents 3babd29 + 8d1a4ce commit 2d82e36
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const QuickMetaPopoverButtonMenu = observer<PopoverButtonProps>(({ conten
stopPropagation
icon={<CarbonIcon icon={OverflowMenuVertical16} />}
css={buttonStyle}
content={<Menu onClick={(e) => e.stopPropagation()}>{content}</Menu>}
content={<Menu>{content}</Menu>}
{...props}
/>
));
Expand Down
4 changes: 4 additions & 0 deletions packages/ui-styles/src/components/PopoverButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ export const PopoverButton = ({
)}
content={content}
{...popoverProps}
onClose={(e) => {
if (stopPropagation) e.stopPropagation();
popoverProps?.onClose?.(e);
}}
/>
);
};
Expand Down

0 comments on commit 2d82e36

Please sign in to comment.