Skip to content

Commit

Permalink
[frontend] Fix global search toolbar (#8837)
Browse files Browse the repository at this point in the history
  • Loading branch information
SouadHadjiat authored Oct 31, 2024
1 parent 11067c2 commit 0eea615
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ type OCTIDataTableProps = Pick<DataTableProps, 'dataColumns'
availableRelationFilterTypes?: FilterIconButtonProps['availableRelationFilterTypes']
availableEntityTypes?: string[]
availableRelationshipTypes?: string[]
globalSearch?: string;
searchContextFinal?: { entityTypes: string[]; elementId?: string[] }
exportContext?: { entity_type: string, entity_id?: string }
additionalHeaderButtons?: ReactNode[]
Expand All @@ -64,6 +65,7 @@ const DataTable = (props: OCTIDataTableProps) => {
storageKey,
initialValues,
availableFilterKeys: defaultAvailableFilterKeys,
globalSearch,
searchContextFinal,
availableEntityTypes,
availableRelationshipTypes,
Expand Down Expand Up @@ -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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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' }}
Expand Down

0 comments on commit 0eea615

Please sign in to comment.