Skip to content

How to make MenuBar close upon Next Link click #4054

Answered by mohamedtsx
Gustavo-Feijo asked this question in Q&A
Discussion options

You must be logged in to vote

Just add the asChild prop to MenubarItem:

  <MenubarContent>
    <MenubarItem asChild>
      <Link href="/admin/dashboard/books/new">{t("new")}</Link>
    </MenubarItem>
  </MenubarContent>

For more details, you can refer to the Radix UI Menubar documentation.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Gustavo-Feijo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants