Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(expandable-tile): onClick is called twice for ExpandableTile #10358

Merged
6 changes: 2 additions & 4 deletions packages/react/src/components/Tile/Tile.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ export class ExpandableTile extends Component {
*/
handleClick: deprecate(
PropTypes.func,
'The handleClick prop for ClickableTile has been deprecated in favor of onClick. It will be removed in the next major release.'
'The handleClick prop for ExpandableTile has been deprecated in favor of onClick. It will be removed in the next major release.'
),

/**
Expand Down Expand Up @@ -629,8 +629,6 @@ export class ExpandableTile extends Component {
expanded, // eslint-disable-line
tileMaxHeight, // eslint-disable-line
tilePadding, // eslint-disable-line
handleClick, // eslint-disable-line
onClick,
onKeyUp,
tileCollapsedIconText,
tileExpandedIconText,
Expand Down Expand Up @@ -676,7 +674,7 @@ export class ExpandableTile extends Component {
title={isExpanded ? tileExpandedIconText : tileCollapsedIconText}
{...rest}
onKeyUp={composeEventHandlers([onKeyUp, this.handleKeyUp])}
onClick={composeEventHandlers([onClick, this.handleClick])}
onClick={this.handleClick}
tabIndex={tabIndex}>
<div
ref={(tileContent) => {
Expand Down