File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
src/components/Configs/ConfigSummary Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 6
6
import { Badge } from "@flanksource-ui/ui/Badge/Badge" ;
7
7
import { CountBadge } from "@flanksource-ui/ui/Badge/CountBadge" ;
8
8
import { DataTable } from "@flanksource-ui/ui/DataTable" ;
9
+ import useReactTableSortState from "@flanksource-ui/ui/DataTable/Hooks/useReactTableSortState" ;
9
10
import { CellContext , ColumnDef , Row } from "@tanstack/react-table" ;
10
11
import { useCallback , useMemo } from "react" ;
11
12
import { BiLabel } from "react-icons/bi" ;
@@ -318,6 +319,8 @@ export default function ConfigSummaryList({
318
319
return [ ...newColumns , ...configSummaryColumns ] ;
319
320
} , [ groupBy , groupByTags ] ) ;
320
321
322
+ const [ sortState , updateSortState ] = useReactTableSortState ( ) ;
323
+
321
324
return (
322
325
< DataTable
323
326
stickyHead
@@ -330,6 +333,9 @@ export default function ConfigSummaryList({
330
333
hiddenColumns = {
331
334
groupBy . length > 1 ? groupBy . slice ( 0 , groupBy . length - 1 ) : undefined
332
335
}
336
+ enableServerSideSorting
337
+ onTableSortByChanged = { updateSortState }
338
+ tableSortByState = { sortState }
333
339
handleRowClick = { handleRowClick }
334
340
tableStyle = { { borderSpacing : "0" } }
335
341
isLoading = { isLoading }
You can’t perform that action at this time.
0 commit comments