added OrderBy functionality to Data Table

This commit is contained in:
PxlLoewe
2025-06-03 17:54:30 -07:00
parent 574472dcb9
commit 0eb3ba8104
11 changed files with 117 additions and 121 deletions

View File

@@ -8,6 +8,7 @@ import { ColumnDef } from "@tanstack/react-table";
export default function ReportPage() {
return (
<PaginatedTable
initialOrderBy={[{ id: "timestamp", desc: true }]}
prismaModel="report"
include={{
Sender: true,
@@ -50,8 +51,7 @@ export default function ReportPage() {
{
accessorKey: "timestamp",
header: "Time",
cell: ({ row }) =>
new Date(row.getValue("timestamp")).toLocaleString(),
cell: ({ row }) => new Date(row.getValue("timestamp")).toLocaleString(),
},
{
accessorKey: "actions",