From 19bf8f4ec89a8a97e7273de91d6b350ac871299d Mon Sep 17 00:00:00 2001 From: semd Date: Wed, 28 Apr 2021 17:38:11 +0200 Subject: [PATCH] prevent adding empty column to timeline table when no action need --- .../open_timeline/timelines_table/index.tsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/index.tsx index c1b30f3e68cf4..4aa6fd469de26 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/index.tsx @@ -83,13 +83,15 @@ export const getTimelinesTableColumns = ({ }), ...getExtendedColumns(showExtendedColumns), ...getIconHeaderColumns({ timelineType }), - ...getActionsColumns({ - actionTimelineToShow, - deleteTimelines, - enableExportTimelineDownloader, - onOpenDeleteTimelineModal, - onOpenTimeline, - }), + ...(actionTimelineToShow.length + ? getActionsColumns({ + actionTimelineToShow, + deleteTimelines, + enableExportTimelineDownloader, + onOpenDeleteTimelineModal, + onOpenTimeline, + }) + : []), ]; };