Skip to content

Commit

Permalink
EuiBasicTable actions close their context menu when clicked. (#1069)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcenizal authored Aug 1, 2018
1 parent 94a7002 commit 46e4d30
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

**Bug fixes**

- Fixed `EuiXYChart` responsive resize in a flexbox layout ([#1041](https://github.com/elastic/eui/pull/1041))
- Fixed `EuiSeriesChart` (previously `EuiXYChart`) responsive resize in a flexbox layout ([#1041](https://github.com/elastic/eui/pull/1041))
- `EuiInMemoryTable` no longer mutates the `items` prop array when sorting, adding deterministic sorting ([#1057](https://github.com/elastic/eui/pull/1057))
- `EuiBasicTable` actions now close their context menu when clicked ([#1069](https://github.com/elastic/eui/pull/1069))

**Experimental breaking change**

Expand Down
7 changes: 6 additions & 1 deletion src/components/basic_table/collapsed_item_actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ export class CollapsedItemActions extends Component {
}
}

onClickItem = (onClickAction) => {
this.closePopover();
onClickAction();
}

render() {

const { actions, itemId, item, actionEnabled, onFocus, className } = this.props;
Expand Down Expand Up @@ -72,7 +77,7 @@ export class CollapsedItemActions extends Component {
key={key}
disabled={!enabled}
icon={action.icon}
onClick={action.onClick.bind(null, item)}
onClick={this.onClickItem.bind(null, action.onClick.bind(null, item))}
>
{action.name}
</EuiContextMenuItem>
Expand Down

0 comments on commit 46e4d30

Please sign in to comment.