or is there any workaround?
","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"The first argument of the accessor can be a string, or a callback function using the row data
\nhttps://tanstack.com/table/v8/docs/guide/column-defs#accessor-functions
const columnHelper = createColumnHelper<Data>()\n\ncolumnHelper.accessor(row => `${row.senderName} ${row.senderId}`, {\n header: \"Sender Details\",\n id: 'senderDetails'\n size: 180,\n}),\ncolumnHelper.accessor ?
#4388
-
|
I want to access two fields with something like this type Data {
senderName: string
senderId: string
}
const columnHelper = createColumnHelper<Data>()
columnHelper.accessor(["senderName", "senderId"], {
header: "Sender Details",
cell: info => `${info.getValue().senderName} ${info.getValue().senderId}`,
size: 180,
}),or is there any workaround? |
Beta Was this translation helpful? Give feedback.
-
|
The first argument of the accessor can be a string, or a callback function using the row data |
Beta Was this translation helpful? Give feedback.
The first argument of the accessor can be a string, or a callback function using the row data
https://tanstack.com/table/v8/docs/guide/column-defs#accessor-functions