Open sfladager opened 5 months ago
Can you create a sandbox with a demo of what you are trying to achieve?
My understanding is that the Dropdown menu always closes when anything outside of the menu is selected. Is there any property that allows the menu to stay open until a "cancel" button is selected, so we can interact with the rest of the page before making our selection in the Dropdown menu?
I'm facing a similar problem. In my case, I want the menu content to stay open while the user navigates with the onboarding tool to get explanations about the menu options.
Any updates on this?
I'm looking for same thing. A force-open & force-close option or something similar would be very useful.
Bug report
Current Behavior
Goal: Force the content menu to be open on mobile navigation menu. Problem: Cannot force dropdown content menu to be open.
I am setting
data-state='open
on Trigger and Content does nothing. I am using ui.shadcn, so ideally I'd like to pass these values conditionally to the navigation-menu.tsx file from a higher level NavLink component. In the browser the css is set to 'open', but still the content menu only opens on hover.Here is the radix code I am using where I am setting
data-state='open'
`const NavigationMenuTrigger = React.forwardRef< React.ElementRef,
React.ComponentPropsWithoutRef
`const NavigationMenuContent = React.forwardRef< React.ElementRef,
React.ComponentPropsWithoutRef
Expected behavior
Goal: Force the content menu to be open on mobile navigation menu.
Reproducible example
You can view the full code on github at these 2 links: navigation-menu.tsx NavLInks.tsx
Suggested solution
Additional context
Your environment