From 3f7dc7620c19a64661a5ef48cc0def991d1fcc8d Mon Sep 17 00:00:00 2001 From: Egbert Bouman Date: Sun, 1 Dec 2024 12:13:04 +0100 Subject: [PATCH] Allow sorting downloads by progress --- src/tribler/ui/src/pages/Downloads/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tribler/ui/src/pages/Downloads/index.tsx b/src/tribler/ui/src/pages/Downloads/index.tsx index 1afb407ac3..e5b1fb5ee6 100644 --- a/src/tribler/ui/src/pages/Downloads/index.tsx +++ b/src/tribler/ui/src/pages/Downloads/index.tsx @@ -45,7 +45,7 @@ const downloadColumns: ColumnDef[] = [ }, }, { - accessorKey: "status", + accessorKey: "progress", header: getHeader('Status'), cell: ({ row }) => { return ( @@ -166,7 +166,7 @@ export default function Downloads({ statusFilter }: { statusFilter: number[] }) }; // We're not getting resize event for elements within ResizeablePanel, so we track the ResizablePanel itself. - const parentRect = useResizeObserver({element: document.querySelector('#download-list')}); + const parentRect = useResizeObserver({ element: document.querySelector('#download-list') }); return ( @@ -193,7 +193,7 @@ export default function Downloads({ statusFilter }: { statusFilter: number[] }) filters={filters} allowMultiSelect={true} onSelectedRowsChange={setSelectedDownloads} - maxHeight={Math.max((parentRect?.height ?? 50)-50, 50)} + maxHeight={Math.max((parentRect?.height ?? 50) - 50, 50)} storeSortingState="download-sorting" />