Skip to content

Commit

Permalink
fix(v2): prevent click on item menu with children on mobiles (#4189)
Browse files Browse the repository at this point in the history
  • Loading branch information
lex111 authored Feb 8, 2021
1 parent 174b420 commit cfeadbf
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ function NavItemMobile({
role="button"
className={navLinkClassNames(className, true)}
{...props}
onClick={() => {
onClick={(e) => {
e.preventDefault();
setCollapsed((state) => !state);
}}>
{props.children ?? props.label}
Expand Down

0 comments on commit cfeadbf

Please sign in to comment.