From 456a33c43fb29979d77be384851b92a73a4d09f5 Mon Sep 17 00:00:00 2001 From: Terry Yao Date: Fri, 7 Jan 2022 12:54:01 +0800 Subject: [PATCH 1/2] fix onClick is called twice for ExpandableTile --- packages/react/src/components/Tile/Tile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react/src/components/Tile/Tile.js b/packages/react/src/components/Tile/Tile.js index ee3d2d4ab023..0526d52d595c 100644 --- a/packages/react/src/components/Tile/Tile.js +++ b/packages/react/src/components/Tile/Tile.js @@ -676,7 +676,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}>
{ From 8087895cc2a02a08f03a24a45949943ba207c990 Mon Sep 17 00:00:00 2001 From: Terry Yao Date: Tue, 11 Jan 2022 10:12:11 +0800 Subject: [PATCH 2/2] fix(ExpandableTile): fix lint --- packages/react/src/components/Tile/Tile.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/react/src/components/Tile/Tile.js b/packages/react/src/components/Tile/Tile.js index 0526d52d595c..54625b0080e4 100644 --- a/packages/react/src/components/Tile/Tile.js +++ b/packages/react/src/components/Tile/Tile.js @@ -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.' ), /** @@ -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,