T
TanStack2y ago
ugly-tan

Get object from `cell` function

columnHelper.display({
id: "actions",
header: "Actions",
cell: (cell) => {
return <button className={"btn btn-sm btn-primary"} onClick={() => onEdit(**______**)}>edit</button>
}
})
columnHelper.display({
id: "actions",
header: "Actions",
cell: (cell) => {
return <button className={"btn btn-sm btn-primary"} onClick={() => onEdit(**______**)}>edit</button>
}
})
If the data I'm passing into the table is TData[] and onEdit is a (entity: TData) => void How do I get the TData from the cell?
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?