Skip to content

Commit

Permalink
[EuiDataGrid] Remove cell actions onmouseleave (#5120)
Browse files Browse the repository at this point in the history
* Remove datagrid cell actions onmouseleave

* changelog
  • Loading branch information
chandlerprall authored Sep 2, 2021
1 parent bca85fb commit 96d3b50
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
**Bug fixes**

- Fixed `EuiScreenReaderOnly` positioning issues within scrolling containers ([#5130](https://github.com/elastic/eui/pull/5130))
- Fixed `EuiDataGrid` cell actions not unmounting from the DOM after mouse interaction ([#5120](https://github.com/elastic/eui/pull/5120))

## [`37.6.0`](https://github.com/elastic/eui/tree/v37.6.0)

Expand Down
3 changes: 3 additions & 0 deletions src/components/datagrid/body/data_grid_cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,9 @@ export class EuiDataGridCell extends Component<
onMouseEnter={() => {
this.setState({ enableInteractions: true });
}}
onMouseLeave={() => {
this.setState({ enableInteractions: false });
}}
onBlur={this.onBlur}
>
{innerContent}
Expand Down
4 changes: 4 additions & 0 deletions src/components/datagrid/data_grid.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,7 @@ describe('EuiDataGrid', () => {
"onFocus": [Function],
"onKeyDown": [Function],
"onMouseEnter": [Function],
"onMouseLeave": [Function],
"role": "gridcell",
"style": Object {
"color": "red",
Expand All @@ -584,6 +585,7 @@ describe('EuiDataGrid', () => {
"onFocus": [Function],
"onKeyDown": [Function],
"onMouseEnter": [Function],
"onMouseLeave": [Function],
"role": "gridcell",
"style": Object {
"color": "blue",
Expand All @@ -602,6 +604,7 @@ describe('EuiDataGrid', () => {
"onFocus": [Function],
"onKeyDown": [Function],
"onMouseEnter": [Function],
"onMouseLeave": [Function],
"role": "gridcell",
"style": Object {
"color": "red",
Expand All @@ -620,6 +623,7 @@ describe('EuiDataGrid', () => {
"onFocus": [Function],
"onKeyDown": [Function],
"onMouseEnter": [Function],
"onMouseLeave": [Function],
"role": "gridcell",
"style": Object {
"color": "blue",
Expand Down

0 comments on commit 96d3b50

Please sign in to comment.