Interface: DataGridProps\<TRow\>
Defined in: src/components/DataGrid.tsx:76
Props for the <DataGrid> component — the single entry point that renders
both flat and tree-mode grids. TRow is the row data type.
Type Parameters
TRow
TRow
Properties
advancedFilter?
optionaladvancedFilter?:AdvancedFilterConfig
Defined in: src/components/DataGrid.tsx:148
Configures advanced filter state and server push-down.
aggregation?
optionalaggregation?:AggregationConfig
Defined in: src/components/DataGrid.tsx:144
Configures aggregate rendering for grouped rows and the footer.
apiRef?
optionalapiRef?:object
Defined in: src/components/DataGrid.tsx:138
Imperative grid API ref.
current
current:
GridApi<TRow> |null
columnManagement?
optionalcolumnManagement?:boolean|ColumnManagementConfig
Defined in: src/components/DataGrid.tsx:152
Enables column management integrations.
columnOrder?
optionalcolumnOrder?:ColumnOrderState
Defined in: src/components/DataGrid.tsx:104
Controlled column order.
columnPinning?
optionalcolumnPinning?:ColumnPinningState
Defined in: src/components/DataGrid.tsx:110
Controlled column pinning.
columns
columns:
AnyColumn<TRow>[]
Defined in: src/components/DataGrid.tsx:80
The column definitions.
columnSizing?
optionalcolumnSizing?:ColumnSizingState
Defined in: src/components/DataGrid.tsx:116
Controlled column widths keyed by column id.
contextMenu?
optionalcontextMenu?:true|ContextMenuConfig<TRow>
Defined in: src/components/DataGrid.tsx:200
Enables the right-click context menu. true = defaults; pass a config to override.
data
data:
TRow[]
Defined in: src/components/DataGrid.tsx:78
The rows to display.
dataSource?
optionaldataSource?:DataSource<TRow>
Defined in: src/components/DataGrid.tsx:86
Optional external data source with server-side capabilities (lazy loading,
pagination, etc.). When provided, the grid uses this instead of creating
an InMemoryDataSource from data.
defaultColumnOrder?
optionaldefaultColumnOrder?:ColumnOrderState
Defined in: src/components/DataGrid.tsx:106
Initial uncontrolled column order. Defaults to the columns order.
defaultColumnPinning?
optionaldefaultColumnPinning?:ColumnPinningState
Defined in: src/components/DataGrid.tsx:112
Initial uncontrolled column pinning. Defaults to each column’s pin field.
defaultColumnSizing?
optionaldefaultColumnSizing?:ColumnSizingState
Defined in: src/components/DataGrid.tsx:118
Initial uncontrolled column widths keyed by column id.
defaultExpanded?
optionaldefaultExpanded?:boolean
Defined in: src/components/DataGrid.tsx:95
Tree mode: when true, every row starts expanded. Defaults to false.
defaultSort?
optionaldefaultSort?:ColumnSort[]
Defined in: src/components/DataGrid.tsx:97
Initial sorting state — an ordered list of column sorts.
defaultViewState?
optionaldefaultViewState?:ViewState
Defined in: src/components/DataGrid.tsx:154
Initial view state to restore after table creation.
density?
optionaldensity?:Density
Defined in: src/components/DataGrid.tsx:128
Visual density. Default: ‘standard’.
editable?
optionaleditable?:EditableConfig
Defined in: src/components/DataGrid.tsx:136
Enables cell editing. Omit to keep the grid read-only.
export?
optionalexport?:ExportConfig<TRow>
Defined in: src/components/DataGrid.tsx:150
Configures grid export defaults.
flashOnUpdate?
optionalflashOnUpdate?:FlashConfig
Defined in: src/components/DataGrid.tsx:207
Briefly highlights cells whose values change between renders. Useful with
useLiveUpdates or any other source of streaming row updates. Default off.
groupBy?
optionalgroupBy?:string[]
Defined in: src/components/DataGrid.tsx:102
Row grouping: column ids to group by, in nesting order.
Mutually exclusive with tree mode; when treeData is provided, tree wins.
height?
optionalheight?:number
Defined in: src/components/DataGrid.tsx:88
Height of the scrollable body area in pixels. Defaults to 400.
icons?
optionalicons?:Partial<Record<StrataIconName,ComponentType<{className?:string;size?:number; }>>>
Defined in: src/components/DataGrid.tsx:134
Icon overrides for the grid’s built-in icons.
onCellEditEnd?
optionalonCellEditEnd?: (event) =>void
Defined in: src/components/DataGrid.tsx:160
Called when a cell edit ends.
Parameters
event
columnId
string
committed
boolean
newValue
unknown
rowId
string
value
unknown
Returns
void
onCellEditStart?
optionalonCellEditStart?: (event) =>void
Defined in: src/components/DataGrid.tsx:158
Called when a cell edit starts.
Parameters
event
columnId
string
rowId
string
value
unknown
Returns
void
onColumnOrderChange?
optionalonColumnOrderChange?: (state) =>void
Defined in: src/components/DataGrid.tsx:108
Called when drag-to-reorder changes the column order.
Parameters
state
Returns
void
onColumnPinningChange?
optionalonColumnPinningChange?: (state) =>void
Defined in: src/components/DataGrid.tsx:114
Called when column pinning changes.
Parameters
state
Returns
void
onColumnSizingChange?
optionalonColumnSizingChange?: (state) =>void
Defined in: src/components/DataGrid.tsx:120
Called when column resize changes column widths.
Parameters
state
Returns
void
onFillRange?
optionalonFillRange?: (event) =>void
Defined in: src/components/DataGrid.tsx:198
Called when the user completes a fill-handle drag.
Parameters
event
Returns
void
onPaginationChange?
optionalonPaginationChange?: (state) =>void
Defined in: src/components/DataGrid.tsx:181
Called whenever the grid’s paginated state changes. Use this to drive a
shell-rendered status bar with total count, current page, or loading
state — ViewState intentionally doesn’t include pagination, so this
callback is the supported seam.
Parameters
state
currentPage
number
error
Error | null
hasMore
boolean
isLoading
boolean
pageSize
number
totalCount
number
totalPages
number
Returns
void
onRowEditEnd?
optionalonRowEditEnd?: (event) =>void
Defined in: src/components/DataGrid.tsx:170
Called when a row edit ends.
Parameters
event
changes
Record<string, { newValue: unknown; oldValue: unknown; }>
committed
boolean
rowId
string
Returns
void
onRowEditStart?
optionalonRowEditStart?: (event) =>void
Defined in: src/components/DataGrid.tsx:168
Called when a row edit starts.
Parameters
event
rowId
string
Returns
void
onSelectionChange?
optionalonSelectionChange?: (state) =>void
Defined in: src/components/DataGrid.tsx:124
Called when row selection changes.
Parameters
state
Returns
void
onTreeChange?
optionalonTreeChange?: (state,changeSet) =>void
Defined in: src/components/DataGrid.tsx:142
Called when the tree editor state changes.
Parameters
state
TreeState<TRow>
changeSet
ChangeSet<TRow>
Returns
void
onViewStateChange?
optionalonViewStateChange?: (state) =>void
Defined in: src/components/DataGrid.tsx:156
Called when serializable view state changes.
Parameters
state
Returns
void
pagination?
optionalpagination?:PaginationConfig
Defined in: src/components/DataGrid.tsx:146
Configures pagination behavior.
rowActions?
optionalrowActions?:RowActionsConfig<TRow>
Defined in: src/components/DataGrid.tsx:196
Renders a built-in actions column with per-row buttons. Supports inline
icon buttons and kebab-menu displays. The column is pinned to the right
edge by default; set pin: false to leave it unpinned, or pin: 'left'
to pin it to the left.
selection?
optionalselection?:SelectionConfig
Defined in: src/components/DataGrid.tsx:122
Enables row selection.
statusBar?
optionalstatusBar?:true|StatusBarConfig<TRow>
Defined in: src/components/DataGrid.tsx:202
Renders an opt-in status bar below the grid body.
striped?
optionalstriped?:boolean
Defined in: src/components/DataGrid.tsx:130
Alternating row background. Default: false.
theme?
optionaltheme?:GridTheme
Defined in: src/components/DataGrid.tsx:126
Visual theme. Defaults to light.
transitions?
optionaltransitions?:boolean
Defined in: src/components/DataGrid.tsx:132
Smooth CSS transitions on theme/density changes. Default: false.
treeData?
optionaltreeData?:TreeDataConfig<TRow>
Defined in: src/components/DataGrid.tsx:93
Turns on tree (hierarchical / BOM) mode. Provide either getChildren
(nested data) or getParentId (flat data).
treeEditor?
optionaltreeEditor?:TreeEditorConfig<TRow>
Defined in: src/components/DataGrid.tsx:140
Enables tree structure editing (add/delete/move/reparent).