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

[EuiBasicTable] Custom actions in a collapsed actions menu should close popover on click #3619

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**

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