mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Security Solution] Fix cell actions in Explore pages (#177478)
## Summary issue: https://github.com/elastic/kibana/issues/177410 Adding `overflow: hidden` style was causing the cell actions to disappear after the upgrade to [EUI upgrade to v91.3.1](https://github.com/elastic/kibana/pull/173569) The `overflow: hidden` style is no longer needed, it has been removed. So cell actions are displayed
This commit is contained in:
parent
81bccc5a81
commit
ab864b4ccc
2 changed files with 4 additions and 18 deletions
|
@ -85,25 +85,13 @@ export const mapSortingColumns = ({
|
||||||
export const addBuildingBlockStyle = (
|
export const addBuildingBlockStyle = (
|
||||||
ecs: Ecs,
|
ecs: Ecs,
|
||||||
theme: EuiTheme,
|
theme: EuiTheme,
|
||||||
setCellProps: EuiDataGridCellValueElementProps['setCellProps'],
|
setCellProps: EuiDataGridCellValueElementProps['setCellProps']
|
||||||
defaultStyles?: React.CSSProperties
|
|
||||||
) => {
|
) => {
|
||||||
const currentStyles = defaultStyles ?? {};
|
|
||||||
if (isEventBuildingBlockType(ecs)) {
|
if (isEventBuildingBlockType(ecs)) {
|
||||||
setCellProps({
|
setCellProps({ style: { backgroundColor: `${theme.eui.euiColorHighlight}` } });
|
||||||
style: {
|
|
||||||
...currentStyles,
|
|
||||||
backgroundColor: `${theme.eui.euiColorHighlight}`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
// reset cell style
|
// reset cell style
|
||||||
setCellProps({
|
setCellProps({ style: { backgroundColor: 'inherit' } });
|
||||||
style: {
|
|
||||||
...currentStyles,
|
|
||||||
backgroundColor: 'inherit',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -410,10 +410,8 @@ export const DataTableComponent = React.memo<DataTableProps>(
|
||||||
const ecs = pageRowIndex < data.length ? data[pageRowIndex].ecs : null;
|
const ecs = pageRowIndex < data.length ? data[pageRowIndex].ecs : null;
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const defaultStyles = { overflow: 'hidden' };
|
|
||||||
setCellProps({ style: { ...defaultStyles } });
|
|
||||||
if (ecs && rowData) {
|
if (ecs && rowData) {
|
||||||
addBuildingBlockStyle(ecs, theme, setCellProps, defaultStyles);
|
addBuildingBlockStyle(ecs, theme, setCellProps);
|
||||||
} else {
|
} else {
|
||||||
// disable the cell when it has no data
|
// disable the cell when it has no data
|
||||||
setCellProps({ style: { display: 'none' } });
|
setCellProps({ style: { display: 'none' } });
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue