Skip to content

Commit

Permalink
Disable contextMenu when event is not event.kind=event (elastic#100027)
Browse files Browse the repository at this point in the history
  • Loading branch information
dasansol92 authored and kibanamachine committed May 14, 2021
1 parent f09cb9c commit d3e407b
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ const ActionsComponent: React.FC<ActionProps> = ({
);
const eventType = getEventType(ecsData);

const isEventContextMenuEnabled = useMemo(
() => isEventFilteringEnabled && !!ecsData.event?.kind && ecsData.event?.kind[0] === 'event',
[ecsData.event?.kind, isEventFilteringEnabled]
);

return (
<>
{showCheckboxes && (
Expand Down Expand Up @@ -197,7 +202,7 @@ const ActionsComponent: React.FC<ActionProps> = ({
key="alert-context-menu"
ecsRowData={ecsData}
timelineId={timelineId}
disabled={eventType !== 'signal' && (!isEventFilteringEnabled || eventType !== 'raw')}
disabled={eventType !== 'signal' && !isEventContextMenuEnabled}
refetch={refetch}
onRuleChange={onRuleChange}
/>
Expand Down

0 comments on commit d3e407b

Please sign in to comment.