Skip to content

Commit 7f7ffa5

Browse files
[Security Solution] Fix Timeline row actions overflow (#79861)
1 parent 1e35c3a commit 7f7ffa5

File tree

5 files changed

+11
-13
lines changed

5 files changed

+11
-13
lines changed

x-pack/plugins/security_solution/public/common/components/sourcerer/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ export const Sourcerer = React.memo<SourcererComponentProps>(({ scope: scopeId }
177177
closePopover={handleClosePopOver}
178178
display="block"
179179
panelPaddingSize="s"
180+
repositionOnScroll
180181
ownFocus
181182
>
182183
<PopoverContent>

x-pack/plugins/security_solution/public/timelines/components/timeline/body/index.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,10 @@ export interface BodyProps {
6868
updateNote: UpdateNote;
6969
}
7070

71-
export const hasAdditionalActions = (id: string, eventType?: TimelineEventsType): boolean =>
72-
id === TimelineId.detectionsPage ||
73-
id === TimelineId.detectionsRulesDetailsPage ||
74-
((id === TimelineId.active && eventType && ['all', 'signal', 'alert'].includes(eventType)) ??
75-
false);
71+
export const hasAdditionalActions = (id: TimelineId): boolean =>
72+
[TimelineId.detectionsPage, TimelineId.detectionsRulesDetailsPage, TimelineId.active].includes(
73+
id
74+
);
7675

7776
const EXTRA_WIDTH = 4; // px
7877

@@ -86,7 +85,6 @@ export const Body = React.memo<BodyProps>(
8685
data,
8786
docValueFields,
8887
eventIdToNoteIds,
89-
eventType,
9088
getNotesByIds,
9189
graphEventId,
9290
isEventViewer = false,
@@ -118,9 +116,11 @@ export const Body = React.memo<BodyProps>(
118116
getActionsColumnWidth(
119117
isEventViewer,
120118
showCheckboxes,
121-
hasAdditionalActions(timelineId, eventType) ? DEFAULT_ICON_BUTTON_WIDTH + EXTRA_WIDTH : 0
119+
hasAdditionalActions(timelineId as TimelineId)
120+
? DEFAULT_ICON_BUTTON_WIDTH + EXTRA_WIDTH
121+
: 0
122122
),
123-
[isEventViewer, showCheckboxes, timelineId, eventType]
123+
[isEventViewer, showCheckboxes, timelineId]
124124
);
125125

126126
const columnWidths = useMemo(

x-pack/plugins/security_solution/public/timelines/components/timeline/body/stateful_body.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ const StatefulBodyComponent = React.memo<StatefulBodyComponentProps>(
6161
data,
6262
docValueFields,
6363
eventIdToNoteIds,
64-
eventType,
6564
excludedRowRendererIds,
6665
id,
6766
isEventViewer = false,
@@ -197,7 +196,6 @@ const StatefulBodyComponent = React.memo<StatefulBodyComponentProps>(
197196
data={data}
198197
docValueFields={docValueFields}
199198
eventIdToNoteIds={eventIdToNoteIds}
200-
eventType={eventType}
201199
getNotesByIds={getNotesByIds}
202200
graphEventId={graphEventId}
203201
isEventViewer={isEventViewer}
@@ -232,7 +230,6 @@ const StatefulBodyComponent = React.memo<StatefulBodyComponentProps>(
232230
deepEqual(prevProps.excludedRowRendererIds, nextProps.excludedRowRendererIds) &&
233231
deepEqual(prevProps.docValueFields, nextProps.docValueFields) &&
234232
prevProps.eventIdToNoteIds === nextProps.eventIdToNoteIds &&
235-
prevProps.eventType === nextProps.eventType &&
236233
prevProps.graphEventId === nextProps.graphEventId &&
237234
deepEqual(prevProps.notesById, nextProps.notesById) &&
238235
prevProps.id === nextProps.id &&
@@ -262,7 +259,6 @@ const makeMapStateToProps = () => {
262259
const {
263260
columns,
264261
eventIdToNoteIds,
265-
eventType,
266262
excludedRowRendererIds,
267263
graphEventId,
268264
isSelectAllChecked,
@@ -277,7 +273,6 @@ const makeMapStateToProps = () => {
277273
return {
278274
columnHeaders: memoizedColumnHeaders(columns, browserFields),
279275
eventIdToNoteIds,
280-
eventType,
281276
excludedRowRendererIds,
282277
graphEventId,
283278
isSelectAllChecked,

x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/add_data_provider_popover.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ const AddDataProviderPopoverComponent: React.FC<AddDataProviderPopoverProps> = (
199199
withTitle
200200
panelPaddingSize="none"
201201
ownFocus={true}
202+
repositionOnScroll
202203
>
203204
{content}
204205
</EuiPopover>

x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/pick_events.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ const PickEventTypeComponents: React.FC<PickEventTypeProps> = ({
335335
button={button}
336336
isOpen={isPopoverOpen}
337337
closePopover={closePopover}
338+
repositionOnScroll
338339
>
339340
<PopoverContent>
340341
<EuiPopoverTitle>

0 commit comments

Comments
 (0)