feat(ui): add sortable column support to DataTable and implement in flows
This commit is contained in:
1 parent
525b9ceead
commit
83da34a1ab
2 files changed
+54
-7
No files matched your search
@@ -117,11 +117,15 @@ export default function FlowsPage() {
|
||||
},
|
||||
{
|
||||
header: "Download",
|
||||
accessor: (row) => <span className="text-blue-400">{fmtBytes(row.bytes_download)}</span>
|
||||
accessor: (row) => <span className="text-blue-400">{fmtBytes(row.bytes_download)}</span>,
|
||||
sortable: true,
|
||||
sortAccessor: (row) => row.bytes_download ?? 0
|
||||
},
|
||||
{
|
||||
header: "Upload",
|
||||
accessor: (row) => <span className="text-green-500">{fmtBytes(row.bytes_upload)}</span>
|
||||
accessor: (row) => <span className="text-green-500">{fmtBytes(row.bytes_upload)}</span>,
|
||||
sortable: true,
|
||||
sortAccessor: (row) => row.bytes_upload ?? 0
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
Reference in new issue
Block a user