radix-ui / primitives

Radix Primitives is an open-source UI component library for building high-quality, accessible design systems and web apps. Maintained by @workos.
https://radix-ui.com/primitives
MIT License
15.91k stars 831 forks source link

DropdownMenu Trigger does not seem to honor disabled state of child component #3203

Open michaelmccomiskey opened 3 weeks ago

michaelmccomiskey commented 3 weeks ago

Question

Should the DropdownMenu Trigger be disabled if the passed in trigger has the disabled attribute set to true?

Currently it seems the Trigger needs to have disabled in order for the trigger to prevent the menu from opening. It feels like it should be honored because of the asChild prop on the Trigger.

Here's an example in code sandbox https://codesandbox.io/p/sandbox/react-typescript-forked-w7whz8