Skip to content

Commit

Permalink
fix(expandable-tile): onClick is called twice for ExpandableTile (#10358
Browse files Browse the repository at this point in the history
)

* fix onClick is called twice for ExpandableTile

* fix(ExpandableTile): fix lint

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
yaoterry and kodiakhq[bot] authored Jan 13, 2022
1 parent 11841d4 commit ee07256
Showing 1 changed file with 2 additions and 4 deletions.
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

0 comments on commit ee07256

Please sign in to comment.