diff --git a/src/components/Configs/ConfigSummary/ConfigSummaryList.tsx b/src/components/Configs/ConfigSummary/ConfigSummaryList.tsx index 2de5358c91..e45edabf5d 100644 --- a/src/components/Configs/ConfigSummary/ConfigSummaryList.tsx +++ b/src/components/Configs/ConfigSummary/ConfigSummaryList.tsx @@ -6,6 +6,7 @@ import { import { Badge } from "@flanksource-ui/ui/Badge/Badge"; import { CountBadge } from "@flanksource-ui/ui/Badge/CountBadge"; import { DataTable } from "@flanksource-ui/ui/DataTable"; +import useReactTableSortState from "@flanksource-ui/ui/DataTable/Hooks/useReactTableSortState"; import { CellContext, ColumnDef, Row } from "@tanstack/react-table"; import { useCallback, useMemo } from "react"; import { BiLabel } from "react-icons/bi"; @@ -318,6 +319,8 @@ export default function ConfigSummaryList({ return [...newColumns, ...configSummaryColumns]; }, [groupBy, groupByTags]); + const [sortState, updateSortState] = useReactTableSortState(); + return ( 1 ? groupBy.slice(0, groupBy.length - 1) : undefined } + enableServerSideSorting + onTableSortByChanged={updateSortState} + tableSortByState={sortState} handleRowClick={handleRowClick} tableStyle={{ borderSpacing: "0" }} isLoading={isLoading}