Skip to content

GridColumnProps

Props for the GridColumn component.

PropertyTypeDescription
fieldkeyof TRow & stringField key in the row object
header?stringColumn header text (defaults to capitalized field)
type?string | number | boolean | select | date | typeaheadColumn data type
editable?booleanWhether the column is editable
sortable?booleanWhether the column is sortable
resizable?booleanWhether the column is resizable
width?string | numberColumn width (e.g., “100px”, “10%“)
minWidth?numberMinimum width for stretch mode
order?numberInitial column display index
hidden?booleanWhether the column is hidden
lockVisible?booleanPrevent column from being hidden
children?(ctx: CellRenderContext<TRow, TValue>) => ReactNodeCustom cell renderer (render prop pattern). Receives cell context and returns React node.
editor?(ctx: ColumnEditorContext<TRow, TValue>) => ReactNodeCustom cell editor. Receives editor context with commit/cancel functions.
options?object[]Select/typeahead options
multi?booleanAllow multiple selection (for select/typeahead)
format?(value: TValue, row: TRow) => stringCustom formatter function
<GridColumn field="status">
{(ctx) => <StatusBadge status={ctx.value} />}
</GridColumn>

<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