[Security solution] [RAC] Add row renderer popover to alert table "reason" field (#108054)

* Add row renderer popover to alert table reason field

* Add a title to row renderer popover on alert table

* Fix issues found during code review
This commit is contained in:
Pablo Machado 2021-08-12 17:11:53 +02:00 committed by GitHub
parent 3950c436a7
commit 79fefe0311
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 385 additions and 19 deletions

View file

@ -6,7 +6,9 @@
*/
import { EuiDataGridCellValueElementProps } from '@elastic/eui';
import { TimelineNonEcsData } from '../../../search_strategy';
import { RowRenderer } from '../../..';
import { Ecs } from '../../../ecs';
import { BrowserFields, TimelineNonEcsData } from '../../../search_strategy';
import { ColumnHeaderOptions } from '../columns';
/** The following props are provided to the function called by `renderCellValue` */
@ -19,4 +21,7 @@ export type CellValueElementProps = EuiDataGridCellValueElementProps & {
timelineId: string;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
setFlyoutAlert?: (data: any) => void;
ecsData?: Ecs;
rowRenderers?: RowRenderer[];
browserFields?: BrowserFields;
};

View file

@ -526,9 +526,12 @@ export const BodyComponent = React.memo<StatefulBodyProps>(
rowIndex,
setCellProps,
timelineId: tabType != null ? `${id}-${tabType}` : id,
ecsData: data[rowIndex].ecs,
browserFields,
rowRenderers,
});
},
[columnHeaders, data, id, renderCellValue, tabType, theme]
[columnHeaders, data, id, renderCellValue, tabType, theme, browserFields, rowRenderers]
);
return (