diff --git a/internal/lookout/ui/src/components/lookoutV2/JobsTableActionBar.tsx b/internal/lookout/ui/src/components/lookoutV2/JobsTableActionBar.tsx
index c9ee9053779..94129d445d4 100644
--- a/internal/lookout/ui/src/components/lookoutV2/JobsTableActionBar.tsx
+++ b/internal/lookout/ui/src/components/lookoutV2/JobsTableActionBar.tsx
@@ -36,6 +36,7 @@ export interface JobsTableActionBarProps {
getJobsService: IGetJobsService
updateJobsService: UpdateJobsService
onClearFilters: () => void
+ onClearGroups: () => void
onAddCustomView: (name: string) => void
onDeleteCustomView: (name: string) => void
onLoadCustomView: (name: string) => void
@@ -62,6 +63,7 @@ export const JobsTableActionBar = memo(
getJobsService,
updateJobsService,
onClearFilters,
+ onClearGroups,
onAddCustomView,
onDeleteCustomView,
onLoadCustomView,
@@ -123,6 +125,9 @@ export const JobsTableActionBar = memo(
+
{
+ // Set grouping to an empty array to clear all groups
+ onGroupingChange([])
+
+ // Reset expanded states as no groups will exist
+ setExpanded({})
+
+ // Clear any related UI states if necessary
+ // For example, resetting selection
+ setSelectedRows({})
+ }
+
const shiftSelectRow = async (row: Row) => {
if (lastSelectedRow === undefined || row.depth !== lastSelectedRow.depth) {
return
@@ -767,6 +779,7 @@ export const JobsTableContainer = ({
getJobsService={getJobsService}
updateJobsService={updateJobsService}
onClearFilters={clearFilters}
+ onClearGroups={clearGroups}
onAddCustomView={addCustomView}
onDeleteCustomView={deleteCustomView}
onLoadCustomView={loadCustomView}