fix(v2): make dropdown button clickable with mouse (#3602)

This commit is contained in:
Alexey Pyltsyn 2020-10-19 17:41:18 +03:00 committed by GitHub
parent 7f6fba9d9e
commit 6cfadb89eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -112,7 +112,7 @@ function NavItemDesktop({
<NavLink
className={navLinkClassNames(className)}
{...props}
onClick={(e) => e.preventDefault()}
onClick={props.to ? undefined : (e) => e.preventDefault()}
onKeyDown={(e) => {
if (e.key === 'Enter') {
e.preventDefault();