mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-03 19:21:51 +02:00
💩 Apply focus capture workaround to dropdown menu trigger (#1109)
#2565
This commit is contained in:
parent
469fa9bdb2
commit
acbb6e552f
1 changed files with 12 additions and 1 deletions
|
@ -9,7 +9,18 @@ import { Icon } from "./icon";
|
||||||
|
|
||||||
const DropdownMenu = DropdownMenuPrimitive.Root;
|
const DropdownMenu = DropdownMenuPrimitive.Root;
|
||||||
|
|
||||||
const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
const DropdownMenuTrigger = React.forwardRef<
|
||||||
|
React.ElementRef<typeof DropdownMenuPrimitive.Trigger>,
|
||||||
|
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Trigger>
|
||||||
|
>(({ ...props }, ref) => (
|
||||||
|
<DropdownMenuPrimitive.Trigger
|
||||||
|
ref={ref}
|
||||||
|
{...props}
|
||||||
|
onFocusCapture={(e) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
));
|
||||||
|
|
||||||
const DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
const DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue