diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c8485c1d2f..df45ae63cd1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ - Fixed `euiHeaderAffordForFixed` mixin's use of header SASS variable ([#3592](https://github.com/elastic/eui/pull/3592)) - Included `onClick` as a valid prop for `EuiControlBar` **icon** controls ([#3581](https://github.com/elastic/eui/pull/3581)) - Fixed poor performance of `EuiToolTip` during frequent mouesover/mouseout events ([#3596](https://github.com/elastic/eui/pull/3596)) +- Fixed `EuiBasicTable` custom actions popover from remaining open after click ([#3619](https://github.com/elastic/eui/pull/3619)) **Breaking changes** diff --git a/src/components/basic_table/collapsed_item_actions.tsx b/src/components/basic_table/collapsed_item_actions.tsx index 23cf65c22bb..d9a1cbcdc47 100644 --- a/src/components/basic_table/collapsed_item_actions.tsx +++ b/src/components/basic_table/collapsed_item_actions.tsx @@ -128,10 +128,12 @@ export class CollapsedItemActions extends Component< controls.push( {} + onClick={() => + this.onClickItem( + actionControlOnClick + ? () => actionControlOnClick(item) + : undefined + ) }> {actionControl} @@ -159,10 +161,9 @@ export class CollapsedItemActions extends Component< target={target} icon={icon} data-test-subj={dataTestSubj} - onClick={this.onClickItem.bind( - null, - onClick ? onClick.bind(null, item) : undefined - )}> + onClick={() => + this.onClickItem(onClick ? () => onClick(item) : undefined) + }> {name} );