From 142c6df9ff5d72e3340b3640d50f70e3b9e84622 Mon Sep 17 00:00:00 2001 From: David Szabo Date: Thu, 8 Jul 2021 14:05:08 +0200 Subject: [PATCH] Only handle click event once --- packages/components/src/navigation/item/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/components/src/navigation/item/index.js b/packages/components/src/navigation/item/index.js index 625a5f3cb7265a..6996cb6fce2723 100644 --- a/packages/components/src/navigation/item/index.js +++ b/packages/components/src/navigation/item/index.js @@ -63,14 +63,15 @@ export default function NavigationItem( props ) { onClick( event ); }; const icon = isRTL() ? chevronLeft : chevronRight; - const baseProps = isText + const baseProps = children ? props : { ...props, onClick: undefined }; + const itemProps = isText ? restProps : { as: Button, href, onClick: onItemClick, ...restProps }; return ( - + { children || ( - +