Using a custom component asChild
of DropdownMenu.Trigger does not work
#1521
Unanswered
JodiWarren
asked this question in
Help
Replies: 1 comment 4 replies
-
In addition to So I would double check those are being passed down correctly. As mentioned in that linked comment, we do want to improve the documentation around this but I hope this helps in the meantime. |
Beta Was this translation helpful? Give feedback.
4 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.
-
We have a somewhat complex custom Button which I'd like to use as the child of a DropdownMenu.Trigger. It just renders a
button
at the end, but there is a fair amount of logic to determine the contents and the styling.I've attempted to I use it like so:
While it renders fine, it doesn't actually trigger the Dropdown. I've tried creating a forwardedRef around it, as suggested in #1369. However that doesn't seem to affect it either way.
Are there any other things that you'd suggest, or any other ways of working with this? At the moment it's a blocker for us using Radix. Other libraries like Headless and Reakit have worked more smoothly, but we really like Radix's depth and breadth.
Beta Was this translation helpful? Give feedback.
All reactions