From 2a98d1af37ca8aca570b3c44728087b6271c3444 Mon Sep 17 00:00:00 2001 From: Philippe Oberti Date: Fri, 20 Sep 2024 15:38:05 +0200 Subject: [PATCH] [Security Solution][Notes] - fix column width on events table on host, user and network pages (#193460) --- .../components/events_tab/events_query_tab_body.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.tsx b/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.tsx index 368fda2500fe1..92c94549ca891 100644 --- a/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.tsx @@ -12,6 +12,7 @@ import { EuiCheckbox } from '@elastic/eui'; import type { Filter } from '@kbn/es-query'; import { dataTableActions } from '@kbn/securitysolution-data-table'; import type { TableId } from '@kbn/securitysolution-data-table'; +import { useIsExperimentalFeatureEnabled } from '../../hooks/use_experimental_features'; import type { CustomBulkAction } from '../../../../common/types'; import { RowRendererValues } from '../../../../common/api/timeline'; import { StatefulEventsViewer } from '../events_viewer'; @@ -73,7 +74,13 @@ const EventsQueryTabBodyComponent: React.FC = const { globalFullScreen } = useGlobalFullScreen(); const [defaultNumberFormat] = useUiSetting$(DEFAULT_NUMBER_FORMAT); const isEnterprisePlus = useLicense().isEnterprise(); - const ACTION_BUTTON_COUNT = isEnterprisePlus ? 5 : 4; + let ACTION_BUTTON_COUNT = isEnterprisePlus ? 6 : 5; + const securitySolutionNotesEnabled = useIsExperimentalFeatureEnabled( + 'securitySolutionNotesEnabled' + ); + if (!securitySolutionNotesEnabled) { + ACTION_BUTTON_COUNT--; + } const leadingControlColumns = useMemo( () => getDefaultControlColumn(ACTION_BUTTON_COUNT), [ACTION_BUTTON_COUNT]