From 0eea61590c72d1146c0ca3579d8837e083c1fe69 Mon Sep 17 00:00:00 2001 From: Souad Hadjiat Date: Thu, 31 Oct 2024 14:06:10 +0100 Subject: [PATCH] [frontend] Fix global search toolbar (#8837) --- .../opencti-front/src/components/dataGrid/DataTable.tsx | 4 +++- .../opencti-front/src/private/components/Search.tsx | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/opencti-platform/opencti-front/src/components/dataGrid/DataTable.tsx b/opencti-platform/opencti-front/src/components/dataGrid/DataTable.tsx index 4f58dea6f14f..a30696f32cfd 100644 --- a/opencti-platform/opencti-front/src/components/dataGrid/DataTable.tsx +++ b/opencti-platform/opencti-front/src/components/dataGrid/DataTable.tsx @@ -45,6 +45,7 @@ type OCTIDataTableProps = Pick { storageKey, initialValues, availableFilterKeys: defaultAvailableFilterKeys, + globalSearch, searchContextFinal, availableEntityTypes, availableRelationshipTypes, @@ -198,7 +200,7 @@ const DataTable = (props: OCTIDataTableProps) => { deSelectedElements={deSelectedElements} numberOfSelectedElements={numberOfSelectedElements} selectAll={selectAll} - search={searchTerm} + search={searchTerm ?? globalSearch} filters={toolbarFilters} handleClearSelectedElements={handleClearSelectedElements} taskScope={taskScope} diff --git a/opencti-platform/opencti-front/src/private/components/Search.tsx b/opencti-platform/opencti-front/src/private/components/Search.tsx index 1f03c130ee43..cc18671df63f 100644 --- a/opencti-platform/opencti-front/src/private/components/Search.tsx +++ b/opencti-platform/opencti-front/src/private/components/Search.tsx @@ -278,6 +278,7 @@ const Search = () => { storageKey={LOCAL_STORAGE_KEY} initialValues={initialValues} toolbarFilters={contextFilters} + globalSearch={searchTerm} lineFragment={searchLineFragment} preloadedPaginationProps={preloadedPaginationOptions} exportContext={{ entity_type: 'Stix-Core-Object' }}