I am using TanStack table in nextJS (react).
I want to have this behavior:
but in the tutorial it says
const columns = React.useMemo(() => [
{
Header: "Name",
accessor: "name",
Cell: AvatarCell,
imgAccessor: "imgUrl",
emailAccessor: "email",
},
Which gives me an error when I try to access imgAccessor or emailAccessor. the error I am getting is
Type '{ header: ({ column }: HeaderContext<Trainee, unknown>) => Element; accessorKey: "name"; imgAccessoor: string; cell: (info: CellContext<Trainee, unknown>) => unknown; }' is not assignable to type 'ColumnDef<Trainee, unknown>'. Object literal may only specify known properties, and 'imgAccessoor' does not exist in type 'ColumnDef<Trainee, unknown>'.