Interface: ColumnDef\<TRow\>
Defined in: src/model/types.ts:54
Definition of a single grid column.
Later milestones extend this interface with pinning and column group options.
Type Parameters
TRow
TRow
Properties
accessor?
optionalaccessor?: keyofTRow| ((row) =>unknown)
Defined in: src/model/types.ts:63
How to read this column’s value from a row: a key of TRow, or a
function. When omitted, id is used as the key.
aggregate?
optionalaggregate?:AggregateType| ((values) =>unknown)
Defined in: src/model/types.ts:122
Aggregation function for group/parent rows.
aggregateFormatter?
optionalaggregateFormatter?: (value) =>ReactNode
Defined in: src/model/types.ts:124
Optional formatter for group/footer aggregate values.
Parameters
value
unknown
Returns
ReactNode
cell?
optionalcell?: (context) =>ReactNode
Defined in: src/model/types.ts:65
Custom cell renderer. Receives cell context, returns React content.
Parameters
context
CellContext<TRow>
Returns
ReactNode
cellClass?
optionalcellClass?: (ctx) =>string|undefined
Defined in: src/model/types.ts:130
Returns a class string to apply to this column’s cells, computed per-row.
Receives the same CellContext<TRow> as cell. Return undefined for
the default class set.
Parameters
ctx
CellContext<TRow>
Returns
string | undefined
cellStyle?
optionalcellStyle?: (ctx) =>CSSProperties|undefined
Defined in: src/model/types.ts:136
Returns inline style overrides for this column’s cells, computed per-row.
Receives the same CellContext<TRow> as cell. Return undefined for
the default styles.
Parameters
ctx
CellContext<TRow>
Returns
CSSProperties | undefined
editable?
optionaleditable?:boolean| ((row) =>boolean)
Defined in: src/model/types.ts:112
Whether this column is editable. Default: false.
editor?
optionaleditor?: (ctx) =>ReactNode
Defined in: src/model/types.ts:116
Custom editor component. Takes precedence over editorType.
Parameters
ctx
EditorContext<TRow>
Returns
ReactNode
editorOptions?
optionaleditorOptions?:Record<string,unknown>
Defined in: src/model/types.ts:118
Editor options (e.g., choices for select editor).
editorType?
optionaleditorType?:EditorType
Defined in: src/model/types.ts:114
Built-in editor type.
filter?
optionalfilter?:false|ColumnFilterConfig
Defined in: src/model/types.ts:104
Filter configuration for this column. Accepts:
'text'— case-insensitive substring matching (default text operators)'number'— numeric comparison (default number operators){ type, operators?, ... }— typed config:text|number|select|boolean|date. Constrains the filter UI and emitted operatorsfalse— disable filtering
Defaults to false (no filter). See ColumnFilterConfig for the full
object shape.
flex?
optionalflex?:number
Defined in: src/model/types.ts:79
Grow factor — when set, this column absorbs a share of the leftover
horizontal space (container width minus the sum of all fixed-width
columns). Multiple flex columns split the remainder by ratio. Honors
minWidth and maxWidth. The user explicitly resizing a flex column
converts it to fixed width.
header
header:
ReactNode
Defined in: src/model/types.ts:58
Header content — a string or any React node.
id
id:
string
Defined in: src/model/types.ts:56
Unique, stable column id.
isTreeColumn?
optionalisTreeColumn?:boolean
Defined in: src/model/types.ts:86
Marks this column as the tree column — the one that shows the hierarchy (depth indentation and the expand/collapse control). Tree mode only; exactly one column should set it. If none does, the first column is used and a development warning is emitted.
maxWidth?
optionalmaxWidth?:number
Defined in: src/model/types.ts:71
Maximum column width in pixels. Only honored when flex is set.
minWidth?
optionalminWidth?:number
Defined in: src/model/types.ts:69
Minimum column width in pixels. Defaults to MIN_COLUMN_WIDTH.
pin?
optionalpin?:"left"|"right"
Defined in: src/model/types.ts:110
Pins (freezes) this column to the left or right edge of the grid. Pinned columns are always visible and never column-virtualized. Defaults to unpinned (center).
sortable?
optionalsortable?:boolean
Defined in: src/model/types.ts:91
Whether this column is sortable. Defaults to true.
Set to false to disable sorting for this column.
validate?
Defined in: src/model/types.ts:120
Validation rules for this column.
width?
optionalwidth?:number
Defined in: src/model/types.ts:67
Fixed column width in pixels. Defaults to DEFAULT_COLUMN_WIDTH.