mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
# Backport This will backport the following commits from `main` to `8.13`: - [[Security Solution] Fix cell actions in Explore pages (#177478)](https://github.com/elastic/kibana/pull/177478) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Sergi Massaneda","email":"sergi.massaneda@elastic.co"},"sourceCommit":{"committedDate":"2024-02-21T17:52:45Z","message":"[Security Solution] Fix cell actions in Explore pages (#177478)\n\n## Summary\r\n\r\nissue: https://github.com/elastic/kibana/issues/177410\r\n\r\nAdding `overflow: hidden` style was causing the cell actions to\r\ndisappear after the upgrade to [EUI upgrade to\r\nv91.3.1](https://github.com/elastic/kibana/pull/173569)\r\n\r\nThe `overflow: hidden` style is no longer needed, it has been removed.\r\nSo cell actions are displayed","sha":"ab864b4ccc699cc1a986bf099460ad877a42333d","branchLabelMapping":{"^v8.14.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","Team:Threat Hunting","Team:Threat Hunting:Explore","v8.13.0","v8.14.0"],"title":"[Security Solution] Fix cell actions in Explore pages","number":177478,"url":"https://github.com/elastic/kibana/pull/177478","mergeCommit":{"message":"[Security Solution] Fix cell actions in Explore pages (#177478)\n\n## Summary\r\n\r\nissue: https://github.com/elastic/kibana/issues/177410\r\n\r\nAdding `overflow: hidden` style was causing the cell actions to\r\ndisappear after the upgrade to [EUI upgrade to\r\nv91.3.1](https://github.com/elastic/kibana/pull/173569)\r\n\r\nThe `overflow: hidden` style is no longer needed, it has been removed.\r\nSo cell actions are displayed","sha":"ab864b4ccc699cc1a986bf099460ad877a42333d"}},"sourceBranch":"main","suggestedTargetBranches":["8.13"],"targetPullRequestStates":[{"branch":"8.13","label":"v8.13.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.14.0","branchLabelMappingKey":"^v8.14.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/177478","number":177478,"mergeCommit":{"message":"[Security Solution] Fix cell actions in Explore pages (#177478)\n\n## Summary\r\n\r\nissue: https://github.com/elastic/kibana/issues/177410\r\n\r\nAdding `overflow: hidden` style was causing the cell actions to\r\ndisappear after the upgrade to [EUI upgrade to\r\nv91.3.1](https://github.com/elastic/kibana/pull/173569)\r\n\r\nThe `overflow: hidden` style is no longer needed, it has been removed.\r\nSo cell actions are displayed","sha":"ab864b4ccc699cc1a986bf099460ad877a42333d"}}]}] BACKPORT--> Co-authored-by: Sergi Massaneda <sergi.massaneda@elastic.co>
This commit is contained in:
parent
733aeb79f4
commit
23516c2595
2 changed files with 4 additions and 18 deletions
|
@ -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' } });
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -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' } });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue