From 153a11da602cbdf25e0de574369344e25c9d2105 Mon Sep 17 00:00:00 2001 From: Christine Weng Date: Mon, 28 Nov 2022 14:02:52 -0600 Subject: [PATCH] add title to initializeT-grid and remove subsequent initialization --- .../public/common/components/sessions_viewer/index.tsx | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/x-pack/plugins/security_solution/public/common/components/sessions_viewer/index.tsx b/x-pack/plugins/security_solution/public/common/components/sessions_viewer/index.tsx index ea00011489452..aad3ab6ab5e46 100644 --- a/x-pack/plugins/security_solution/public/common/components/sessions_viewer/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/sessions_viewer/index.tsx @@ -106,6 +106,7 @@ const SessionsViewComponent: React.FC = ({ dispatch( dataTableActions.initializeTGridSettings({ id: tableId, + title: i18n.SESSIONS_TITLE, defaultColumns: eventsDefaultModel.columns.map((c) => !tGridEnabled && c.initialWidth == null ? { @@ -146,15 +147,6 @@ const SessionsViewComponent: React.FC = ({ const unit = (c: number) => c > 1 ? i18n.TOTAL_COUNT_OF_SESSIONS : i18n.SINGLE_COUNT_OF_SESSIONS; - useEffect(() => { - dispatch( - dataTableActions.initializeTGridSettings({ - id: tableId, - title: i18n.SESSIONS_TITLE, - }) - ); - }, [dispatch, tableId]); - return (