Skip to content

Is there a way to access two field using columnHelper.accessor ? #4388

Discussion options

You must be logged in to vote

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

const columnHelper = createColumnHelper<Data>()

columnHelper.accessor(row => `${row.senderName} ${row.senderId}`, {
  header: "Sender Details",
 id: 'senderDetails'
  size: 180,
}),

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@bryanprimus
Comment options

@writes-of-spring
Comment options

@pmarxbraun
Comment options

@writes-of-spring
Comment options

@akin-fagbohun
Comment options

Answer selected by bryanprimus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants