DataTableColumn
Defined in: src/components/data/DataTable/DataTable.types.ts:26
Description of a single column.
R is the row data type.
accessor may be a string (key of R) or a function returning the cell
value. When omitted, id is used as a key into R if it matches a key,
otherwise the cell is empty.
Type Parameters
R
R
Properties
accessor?
optionalaccessor: keyofR| (row,rowIndex) =>unknown
Defined in: src/components/data/DataTable/DataTable.types.ts:32
How to read the cell value from a row.
align?
optionalalign:DataTableAlign
Defined in: src/components/data/DataTable/DataTable.types.ts:59
Cell horizontal alignment.
Default
"left"ariaHidden?
optionalariaHidden:boolean
Defined in: src/components/data/DataTable/DataTable.types.ts:65
When false, the column header is not focusable for keyboard users.
cell()?
optionalcell: (info) =>ReactNode
Defined in: src/components/data/DataTable/DataTable.types.ts:38
Cell renderer. Receives the resolved value and the row.
When omitted, the value is rendered with String(value) (or empty for
null/undefined).
Parameters
info
column
DataTableColumn<R>
row
R
rowIndex
number
value
unknown
Returns
ReactNode
className?
optionalclassName:string
Defined in: src/components/data/DataTable/DataTable.types.ts:61
Per-column className.
disableResize?
optionaldisableResize:boolean
Defined in: src/components/data/DataTable/DataTable.types.ts:67
When true, this column cannot be resized even if resizableColumns is on.
header?
optionalheader:ReactNode
Defined in: src/components/data/DataTable/DataTable.types.ts:30
Header content (string or any node).
id
id:
string
Defined in: src/components/data/DataTable/DataTable.types.ts:28
Stable column identifier. Required.
maxWidth?
optionalmaxWidth:number
Defined in: src/components/data/DataTable/DataTable.types.ts:49
Maximum column width in px (used for resizing).
minWidth?
optionalminWidth:number
Defined in: src/components/data/DataTable/DataTable.types.ts:47
Minimum column width in px (used for resizing).
sortable?
optionalsortable:boolean
Defined in: src/components/data/DataTable/DataTable.types.ts:51
When true, header click toggles sort on this column.
sortComparator()?
optionalsortComparator: (a,b,rowA,rowB) =>number
Defined in: src/components/data/DataTable/DataTable.types.ts:57
Custom comparator. Receives the resolved cell values for two rows.
Default: localeCompare for strings, < for numbers, Date,
null/undefined ordered last.
Parameters
a
unknown
b
unknown
rowA
R
rowB
R
Returns
number
sticky?
optionalsticky:boolean
Defined in: src/components/data/DataTable/DataTable.types.ts:63
When true, this column sticks to the left edge while scrolling.
width?
optionalwidth:string|number
Defined in: src/components/data/DataTable/DataTable.types.ts:45
Fixed column width (px or any CSS dimension).