TableColumn
Defined in: src/widgets/data/table.ts:28
A Table column: how to read, size, render, and sort one field.
Type Parameters
Section titled “Type Parameters”Row = any
Properties
Section titled “Properties”align?
Section titled “align?”
optionalalign?:"left"|"right"|"center"
Defined in: src/widgets/data/table.ts:45
Cell text alignment.
optionalcell?: (row,rowIndex) =>string
Defined in: src/widgets/data/table.ts:49
Text accessor for a cell. Defaults to String(row[key]).
Parameters
Section titled “Parameters”Row
rowIndex
Section titled “rowIndex”number
Returns
Section titled “Returns”string
compare?
Section titled “compare?”
optionalcompare?: (a,b) =>number
Defined in: src/widgets/data/table.ts:58
Custom comparator; defaults to numeric/locale comparison of the sort value.
Parameters
Section titled “Parameters”Row
Row
Returns
Section titled “Returns”number
header
Section titled “header”header:
string
Defined in: src/widgets/data/table.ts:32
Header label.
key:
string
Defined in: src/widgets/data/table.ts:30
Stable identifier; also the default data accessor (row[key]).
maxWidth?
Section titled “maxWidth?”
optionalmaxWidth?:number
Defined in: src/widgets/data/table.ts:43
Maximum column width in cells.
minWidth?
Section titled “minWidth?”
optionalminWidth?:number
Defined in: src/widgets/data/table.ts:41
Minimum column width in cells.
render?
Section titled “render?”
optionalrender?: (row,rowIndex) =>unknown
Defined in: src/widgets/data/table.ts:56
Renders a widget-bearing cell instead of text. Returns a framework node
(e.g. a React element); only visible rows are materialized. Typed as
unknown here to keep the widget layer framework-neutral — the React
<Table> narrows it.
Parameters
Section titled “Parameters”Row
rowIndex
Section titled “rowIndex”number
Returns
Section titled “Returns”unknown
sortable?
Section titled “sortable?”
optionalsortable?:boolean
Defined in: src/widgets/data/table.ts:47
Whether clicking the header toggles sorting on this column.
width?
Section titled “width?”
optionalwidth?:string|number
Defined in: src/widgets/data/table.ts:39
Column width:
number— fixed cell count"<n>fr"— flexible, shares leftover space proportionally"auto"(or omitted) — sized to the widest visible cell