This commit is contained in:
Tom Moor
2026-06-02 22:11:24 -04:00
committed by GitHub
parent e32b3772b2
commit 3a442ec5d3
2 changed files with 9 additions and 1 deletions
+8 -1
View File
@@ -33,6 +33,12 @@ type Props = {
align?: "start" | "end";
/** ARIA label for the menu */
ariaLabel: string;
/**
* Whether the menu should lock page scroll and trap focus while open.
* Defaults to true. Set to false to avoid the scrollbar-removal layout
* shift when the menu lives inside a scrollable container.
*/
modal?: boolean;
/** Additional component to display at the bottom of the top-level menu */
append?: React.ReactNode;
/** Callback when menu is opened */
@@ -50,6 +56,7 @@ export const DropdownMenu = observer(
children,
align = "start",
ariaLabel,
modal = true,
append,
onOpen,
onClose,
@@ -116,7 +123,7 @@ export const DropdownMenu = observer(
return (
<MenuProvider variant="dropdown">
<Menu open={open} onOpenChange={handleOpenChange}>
<Menu open={open} onOpenChange={handleOpenChange} modal={modal}>
<MenuTrigger ref={ref} aria-label={ariaLabel} {...rest}>
{children}
</MenuTrigger>
+1
View File
@@ -91,6 +91,7 @@ function CommentMenu({
action={rootAction}
align="end"
ariaLabel={t("Comment options")}
modal={false}
>
<OverflowMenuButton className={className} />
</DropdownMenu>