From 8fff783c62c6b9a597619bdf40355ddda0462e8b Mon Sep 17 00:00:00 2001 From: Egbert Bouman Date: Sun, 13 Oct 2024 13:46:30 +0200 Subject: [PATCH] Fix download sorting --- src/tribler/ui/src/components/ui/simple-table.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tribler/ui/src/components/ui/simple-table.tsx b/src/tribler/ui/src/components/ui/simple-table.tsx index ac36950de1..826e388a1f 100644 --- a/src/tribler/ui/src/components/ui/simple-table.tsx +++ b/src/tribler/ui/src/components/ui/simple-table.tsx @@ -1,6 +1,6 @@ import { SetStateAction, useEffect, useRef, useState } from 'react'; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"; -import { getCoreRowModel, useReactTable, flexRender, getFilteredRowModel, getPaginationRowModel, getExpandedRowModel } from '@tanstack/react-table'; +import { getCoreRowModel, useReactTable, flexRender, getFilteredRowModel, getPaginationRowModel, getExpandedRowModel, getSortedRowModel } from '@tanstack/react-table'; import type { ColumnDef, Row, PaginationState, RowSelectionState, ColumnFiltersState, ExpandedState } from '@tanstack/react-table'; import { cn } from '@/lib/utils'; import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel } from './select'; @@ -60,6 +60,7 @@ function SimpleTable({ data, columns, getCoreRowModel: getCoreRowModel(), + getSortedRowModel: getSortedRowModel(), getPaginationRowModel: !!pageSize ? getPaginationRowModel() : undefined, getExpandedRowModel: expandable ? getExpandedRowModel() : undefined, enableRowSelection: true,