[Dropdown Menu] How do I prevent click to open if user clicked and dragged? #2332
Unanswered
matheusbaumgart
asked this question in
Help
Replies: 1 comment 2 replies
-
Did you wrap the button with DropdownMenuTrigger? If you structure the dropdown as shown in the link below, it should behave as shadn ui dropdown : https://ui.shadcn.com/docs/components/dropdown-menu import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
<DropdownMenuTrigger>
<Button>
open dropdown
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent>
.... |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The button (trigger) that opens the menu is also used to click and drag in my application. How do I prevent the menu to open if the user starts a drag action?
Cheers team 🙏
Beta Was this translation helpful? Give feedback.
All reactions