Description of icon
Flex UI
API Reference

ColumnDefinition

A component used to add a column to a DataTable (e.g. QueuesStats․QueuesDataTable)


Component Properties#

NameTypeDescriptionOptionalDefault
keyReact.Key

Identifies the column definition.

No
contentfunction | React.ReactNode

Renders cell content. If it's a function, it receives DataTable row data as the first argument and DataTable context as the second argument. The render function should return React.ReactNode.

No
headerReact.ReactNode

Header content.

No
headerColSpanKeystring

Specify the same key for adjacent columns if you want to merge their headers.

Yes
namestring

Column name is used to add custom classes to cells in the column.

Yes
subHeaderReact.ReactNode

Subheader content.

Yes
sortingFnfunction

A function that defines sort order. The function should return a negative, zero, or positive value. It receives data for two rows to sort as arguments.

Yes
sortDirection"asc" | "desc"

sort

Yes
styleReact.CSSProperties

style

Yes
Rate this page

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.