Skip to content

Commit

Permalink
[EuiBasicTable] Custom actions in a collapsed actions menu should clo…
Browse files Browse the repository at this point in the history
…se popover on click (#3619)

* custom actions in collapsed actions menu close popover on click

* CL
  • Loading branch information
thompsongl authored Jun 16, 2020
1 parent ee87dd0 commit 50b7be9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,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**

Expand Down
17 changes: 9 additions & 8 deletions src/components/basic_table/collapsed_item_actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,12 @@ export class CollapsedItemActions<T> extends Component<
controls.push(
<EuiContextMenuItem
key={key}
onClick={
actionControlOnClick
? actionControlOnClick.bind(null, item)
: () => {}
onClick={() =>
this.onClickItem(
actionControlOnClick
? () => actionControlOnClick(item)
: undefined
)
}>
{actionControl}
</EuiContextMenuItem>
Expand Down Expand Up @@ -159,10 +161,9 @@ export class CollapsedItemActions<T> 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}
</EuiContextMenuItem>
);
Expand Down

0 comments on commit 50b7be9

Please sign in to comment.