Skip to content

Commit

Permalink
Revert dropdown action call changes
Browse files Browse the repository at this point in the history
  • Loading branch information
reyraa committed Dec 3, 2021
1 parent 86cf6d7 commit a1a4fe8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
9 changes: 1 addition & 8 deletions src/components/toolbox/dropdown/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
</div>
Expand Down
1 change: 0 additions & 1 deletion src/components/toolbox/dropdownButton/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ class DropdownButton extends React.Component {
<Dropdown
showArrow={false}
showDropdown={shownDropdown}
toggleDropdown={this.toggleDropdown}
className={`${styles.dropdown} ${className}`}
align={align}
>
Expand Down

0 comments on commit a1a4fe8

Please sign in to comment.