diff --git a/src/components/datagrid/body/cell/data_grid_cell.test.tsx b/src/components/datagrid/body/cell/data_grid_cell.test.tsx index 2e02393b49c..aae8013f6c2 100644 --- a/src/components/datagrid/body/cell/data_grid_cell.test.tsx +++ b/src/components/datagrid/body/cell/data_grid_cell.test.tsx @@ -175,6 +175,10 @@ describe('EuiDataGridCell', () => { style: { top: 0, left: 0, width: 50, height: 10 }, }); }); + it('cellContext', () => { + component.setProps({ cellContext: { someData: true } }); + component.setProps({ cellContext: { someData: false } }); + }); }); describe('when state changes:', () => { diff --git a/src/components/datagrid/body/cell/data_grid_cell.tsx b/src/components/datagrid/body/cell/data_grid_cell.tsx index 1c05480ebb3..2f019022b8f 100644 --- a/src/components/datagrid/body/cell/data_grid_cell.tsx +++ b/src/components/datagrid/body/cell/data_grid_cell.tsx @@ -392,6 +392,7 @@ export class EuiDataGridCell extends Component< if (nextProps.style.width !== this.props.style.width) return true; } + if (nextProps.cellContext !== this.props.cellContext) return true; if (nextState.cellProps !== this.state.cellProps) return true; if (nextState.isFocused !== this.state.isFocused) return true; if (nextState.isHovered !== this.state.isHovered) return true;