From 32d1dbb1f98053ac34d278d945034363695227c3 Mon Sep 17 00:00:00 2001 From: christineweng <18648970+christineweng@users.noreply.github.com> Date: Mon, 28 Nov 2022 18:36:40 -0600 Subject: [PATCH] [Security Solution] Inspect button title missing (#146473) This PR is a quick bug fix for https://github.com/elastic/kibana/issues/141617 - https://github.com/elastic/kibana/pull/143601 fixes the inspect title issue by passing a 'title' prop to `initializeTGridSettings`. - It appears subsequent enhancements in `sessions_viewer` also calls `initializeTGridSettings`, but in a separate manner. This PR combines the two t-grid initialization calls into one. ![image](https://user-images.githubusercontent.com/18648970/204374253-2c98f7c7-76fd-4b60-92ae-367464e64abf.png) --- .../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 (