Skip to content

Commit

Permalink
[Security Solution] Fix cell actions in Explore pages (elastic#177478)
Browse files Browse the repository at this point in the history
## Summary

issue: elastic#177410

Adding `overflow: hidden` style was causing the cell actions to
disappear after the upgrade to [EUI upgrade to
v91.3.1](elastic#173569)

The `overflow: hidden` style is no longer needed, it has been removed.
So cell actions are displayed
  • Loading branch information
semd authored Feb 21, 2024
1 parent 81bccc5 commit ab864b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,25 +85,13 @@ export const mapSortingColumns = ({
export const addBuildingBlockStyle = (
ecs: Ecs,
theme: EuiTheme,
setCellProps: EuiDataGridCellValueElementProps['setCellProps'],
defaultStyles?: React.CSSProperties
setCellProps: EuiDataGridCellValueElementProps['setCellProps']
) => {
const currentStyles = defaultStyles ?? {};
if (isEventBuildingBlockType(ecs)) {
setCellProps({
style: {
...currentStyles,
backgroundColor: `${theme.eui.euiColorHighlight}`,
},
});
setCellProps({ style: { backgroundColor: `${theme.eui.euiColorHighlight}` } });
} else {
// reset cell style
setCellProps({
style: {
...currentStyles,
backgroundColor: 'inherit',
},
});
setCellProps({ style: { backgroundColor: 'inherit' } });
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,10 +410,8 @@ export const DataTableComponent = React.memo<DataTableProps>(
const ecs = pageRowIndex < data.length ? data[pageRowIndex].ecs : null;

useEffect(() => {
const defaultStyles = { overflow: 'hidden' };
setCellProps({ style: { ...defaultStyles } });
if (ecs && rowData) {
addBuildingBlockStyle(ecs, theme, setCellProps, defaultStyles);
addBuildingBlockStyle(ecs, theme, setCellProps);
} else {
// disable the cell when it has no data
setCellProps({ style: { display: 'none' } });
Expand Down

0 comments on commit ab864b4

Please sign in to comment.