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?ColumnTypeColumn 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
options?ColumnOptionsSelect/typeahead options. Serialized onto the element’s options attribute, so values and labels must not contain , or : — pass richer option objects through gridConfig.columns[].options instead.
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.
headerRenderer?(ctx: HeaderCellContext<TRow>) => ReactNodeFull header cell renderer. Consumer owns sort icons and filter buttons — use the renderSortIcon / renderFilterButton helpers on the context to opt in. Resize handles are appended automatically by the grid for resizable columns; do not render one yourself.
headerLabelRenderer?(ctx: HeaderLabelContext<TRow>) => ReactNodeHeader label renderer. The grid keeps ownership of sort icons, filter buttons, and resize handles; this only replaces the label text.
<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()}
/>
)}
/>