Skip to content

Commit

Permalink
Allow sorting downloads by progress (#8295)
Browse files Browse the repository at this point in the history
  • Loading branch information
egbertbouman authored Dec 2, 2024
2 parents 04809a7 + 3f7dc76 commit 4be9694
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tribler/ui/src/pages/Downloads/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const downloadColumns: ColumnDef<Download>[] = [
},
},
{
accessorKey: "status",
accessorKey: "progress",
header: getHeader('Status'),
cell: ({ row }) => {
return (
Expand Down Expand Up @@ -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 (
<ResizablePanelGroup direction="vertical" >
Expand All @@ -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"
/>
</Card>
Expand Down

0 comments on commit 4be9694

Please sign in to comment.