Skip to content

Commit

Permalink
[Security Solution][Document Flyout] Fix toggle column missing in tim…
Browse files Browse the repository at this point in the history
  • Loading branch information
christineweng authored Nov 18, 2024
1 parent 7ace262 commit 467d737
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -40,12 +39,7 @@ interface CellActionsProps {
* Security cell action wrapper for document details flyout
*/
export const CellActions: FC<CellActionsProps> = ({ 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]);
Expand All @@ -58,7 +52,7 @@ export const CellActions: FC<CellActionsProps> = ({ field, value, isObjectArray,
<SecurityCellActions
data={data}
mode={CellActionsMode.HOVER_DOWN}
triggerId={triggerId}
triggerId={SecurityCellActionsTrigger.DETAILS_FLYOUT}
visibleCellActions={6}
sourcererScopeId={getSourcererScopeId(scopeId)}
metadata={metadata}
Expand Down

0 comments on commit 467d737

Please sign in to comment.