Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/neat-squids-grab.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@ag.ds-next/react': patch
---

main-nav: Always close mobile dialog on link click to support updating `activePath` with Next.js‘ `usePathname`.
2 changes: 1 addition & 1 deletion packages/react/src/main-nav/MainNavDialogNavList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function MainNavDialogNavList({
<MainNavDialogNavListItem
active={active}
key={index}
onClick={active ? closeMobileMenu : undefined} // Let the click event bubble up and close the menu on press of interactive item
onClick={closeMobileMenu} // Let the click event bubble up and close the menu on press of interactive item
>
<Link aria-current={active ? 'page' : undefined} {...item}>
<span>{label}</span>
Expand Down
Loading