GridColumnProps
Props for the GridColumn component.
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
field | keyof TRow & string | Field key in the row object |
header? | string | Column header text (defaults to capitalized field) |
type? | string | number | boolean | select | date | typeahead | Column data type |
editable? | boolean | Whether the column is editable |
sortable? | boolean | Whether the column is sortable |
resizable? | boolean | Whether the column is resizable |
width? | string | number | Column width (e.g., “100px”, “10%“) |
minWidth? | number | Minimum width for stretch mode |
order? | number | Initial column display index |
hidden? | boolean | Whether the column is hidden |
lockVisible? | boolean | Prevent column from being hidden |
children? | (ctx: CellRenderContext<TRow, TValue>) => ReactNode | Custom cell renderer (render prop pattern). Receives cell context and returns React node. |
editor? | (ctx: ColumnEditorContext<TRow, TValue>) => ReactNode | Custom cell editor. Receives editor context with commit/cancel functions. |
options? | object[] | Select/typeahead options |
multi? | boolean | Allow multiple selection (for select/typeahead) |
format? | (value: TValue, row: TRow) => string | Custom formatter function |
Property Details
Section titled “Property Details”children
Section titled “children”<GridColumn field="status"> {(ctx) => <StatusBadge status={ctx.value} />}</GridColumn>editor
Section titled “editor”<GridColumn field="name" editable editor={(ctx) => ( <input defaultValue={ctx.value} onBlur={(e) => ctx.commit(e.target.value)} onKeyDown={(e) => e.key === 'Escape' && ctx.cancel()} /> )}/>
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://toolboxjs.com/llms-full.txt