Replies: 1 comment
-
You may find the information you need in the tanstack documentation for Example: accessorKey: 'username',
accessorFn: (row) => { // here we feed username with the required data
return 'something';
}, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
this is my columns.tsx
"use client"
import { ColumnDef } from "@tanstack/react-table"
import { db } from "@/lib/db"
import { Bug } from "@prisma/client"
import { formatTimeToNow } from "@/lib/utils"
import formatDistanceToNow from "date-fns/formatDistanceToNow"
import { parseISO } from "date-fns"
export const columns: ColumnDef[] = [
{
accessorKey: "title",
header: "Title",
},
{
accessorKey: "status",
header: "Status",
},
{
accessorKey: "createdAt",
header: "Created At",
cell:({row}) => {
},
]
`
it is a client component so it throws a error as i perform a server call inside the cell of last column but is there any way i can solve this such that i can get the creator name from User Table via the creatorId that is provided in data ? .
Beta Was this translation helpful? Give feedback.
All reactions