From 467d7370ad5eafda73a8a6ff39deb29709ade5ae Mon Sep 17 00:00:00 2001 From: christineweng <18648970+christineweng@users.noreply.github.com> Date: Mon, 18 Nov 2024 17:44:43 -0600 Subject: [PATCH] [Security Solution][Document Flyout] Fix toggle column missing in timeline (#200647) ## Summary Related: https://github.com/elastic/kibana/issues/200046 Reenabling toggle columns for events. It was mistakenly excluded in [this refactor](https://github.com/elastic/kibana/pull/190560/files#diff-d9edcdb9ad0f231269f791e8392d2d0fe1d10105c223c89d9f86e546972bc342) ![image](https://github.com/user-attachments/assets/e787c227-f167-4f3a-a0e0-d1ac1ad45670) --- .../shared/components/cell_actions.tsx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/shared/components/cell_actions.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/shared/components/cell_actions.tsx index 3ee66eb788373..8e87dd6583fd3 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/shared/components/cell_actions.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/shared/components/cell_actions.tsx @@ -9,7 +9,6 @@ import type { FC } from 'react'; import React, { useMemo } from 'react'; import { useDocumentDetailsContext } from '../context'; import { getSourcererScopeId } from '../../../../helpers'; -import { useBasicDataFromDetailsData } from '../hooks/use_basic_data_from_details_data'; import { SecurityCellActionType } from '../../../../app/actions/constants'; import { CellActionsMode, @@ -40,12 +39,7 @@ interface CellActionsProps { * Security cell action wrapper for document details flyout */ export const CellActions: FC = ({ field, value, isObjectArray, children }) => { - const { dataFormattedForFieldBrowser, scopeId, isPreview } = useDocumentDetailsContext(); - const { isAlert } = useBasicDataFromDetailsData(dataFormattedForFieldBrowser); - - const triggerId = isAlert - ? SecurityCellActionsTrigger.DETAILS_FLYOUT - : SecurityCellActionsTrigger.DEFAULT; + const { scopeId, isPreview } = useDocumentDetailsContext(); const data = useMemo(() => ({ field, value }), [field, value]); const metadata = useMemo(() => ({ scopeId, isObjectArray }), [scopeId, isObjectArray]); @@ -58,7 +52,7 @@ export const CellActions: FC = ({ field, value, isObjectArray,