Issue with NavigationMenu when using asChild
The implementation of NavigationMenu currently looks like this:
{children}
<NavigationMenuViewport />
This breaks when using asChild because that prop can only be used with one child. However, wrapping it with <></> solves the problem.
<>
{children}
<NavigationMenuViewport />
</>
https://github.com/shadcn-ui/ui/pull/1592
I belive this fixes it. Would be nice if anyone on the team @shadcn could give me some feedback on it as its been a while this thing keeps coming up
Thanks @Joshuajrodrigues! Very much appreciated. 🙏
This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.