added OrderBy functionality to Data Table
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user