From a1a4fe86eedca9067160b3636f7ea3f77b79619d Mon Sep 17 00:00:00 2001 From: Ali Haghighatkhah Date: Fri, 3 Dec 2021 09:11:24 +0100 Subject: [PATCH] Revert dropdown action call changes --- src/components/toolbox/dropdown/dropdown.js | 9 +-------- src/components/toolbox/dropdownButton/index.js | 1 - 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/components/toolbox/dropdown/dropdown.js b/src/components/toolbox/dropdown/dropdown.js index b9e3b4af0f3..e430996a269 100644 --- a/src/components/toolbox/dropdown/dropdown.js +++ b/src/components/toolbox/dropdown/dropdown.js @@ -31,14 +31,7 @@ const Dropdown = ({ isSelectionList ? flattenArray(children).map((child, key) => ( child.type === Separator ? child - : React.cloneElement(child, { - className: ` ${styles.option} ${active === key ? styles.active : ''} ${child.props.className || ''}`, - key, - onClick: (...rest) => { - if (typeof toggleDropdown === 'function') toggleDropdown(); - if (child.props.onClick) child.props.onClick(...rest); - }, - }) + : React.cloneElement(child, { className: ` ${styles.option} ${active === key ? styles.active : ''} ${child.props.className || ''}`, key }) )) : children } diff --git a/src/components/toolbox/dropdownButton/index.js b/src/components/toolbox/dropdownButton/index.js index 33ac6c80ead..29bdac5425b 100644 --- a/src/components/toolbox/dropdownButton/index.js +++ b/src/components/toolbox/dropdownButton/index.js @@ -45,7 +45,6 @@ class DropdownButton extends React.Component {