fix(v2): prevent click on item menu with children on mobiles (#4189)

This commit is contained in:
Alexey Pyltsyn 2021-02-08 18:46:40 +03:00 committed by GitHub
parent 174b4200ee
commit cfeadbf824
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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}