@kanunilabs/datagrid-react / DataGridCoreConfig
Interface: DataGridCoreConfig<TRow>
Type Parameters
TRow
TRow = GridRowData
Properties
asyncTransactionWait?
optionalasyncTransactionWait?:number
Milliseconds applyTransactionAsync waits before applying a batch
(gap analysis P3.6). Default 50 — about three frames.
Raise it for a feed that ticks faster than the eye can follow; the grid then repaints less often and each pass carries more. Lower it only if the grid must visibly track something else on screen tick for tick.
columns
columns:
GridColumnDef<TRow>[]
dataSource
dataSource:
TRow[] |DataSource<TRow>
debugMode?
optionaldebugMode?:boolean
Console diagnostics for integration mistakes (duplicate keys, unknown columns…).
defaultColumnDef?
optionaldefaultColumnDef?:Partial<GridColumnDef<TRow>>
getRowHeight?
optionalgetRowHeight?: (node,index) =>number|undefined
Per-row height, in px. Return undefined for the standard height.
OPT-IN, and deliberately so: supplying it means the grid asks about every
row in the view on every projection, which on a million rows is a million
calls per filter keystroke. Leave it off and row geometry stays one
multiplication — see RowHeightIndex. Detail panels and the edit form do
NOT need this; they carry their own height.
For heights that depend on how text wraps, prefer autoHeight on the
column: the adapter measures what it rendered instead of asking the app to
predict it.
Parameters
node
RowNode<TRow>
index
number
Returns
number | undefined
gridId
gridId:
string
grouping?
optionalgrouping?:GroupingConfig
locale?
optionallocale?:string
Locale for collation, date handling AND the interface language. Default
'en'. One of the twelve the grid ships (GRID_LOCALES); a regional tag
narrows to its base (de-AT → de), and anything unknown falls back to
English rather than failing to render.
masterDetail?
optionalmasterDetail?:MasterDetailConfig
Expandable detail panels under rows. Enterprise (P9).
messages?
optionalmessages?:Partial<GridDictionary>
Override individual strings without replacing the language.
Merged over the resolved dictionary, so an app can rename "Actions" to its own wording in every language while leaving the other 250 alone.
pagination?
optionalpagination?:PaginationConfig
remote?
optionalremote?:RemoteConfig
Tuning for a remote DataSource (ignored for array data).
rowHeight?
optionalrowHeight?:number
The STANDARD row height in px. Default 28.
rowKey
rowKey:
RowKeyResolver<TRow>
REQUIRED: stable row identity — selection, editing and live updates hang off it.
scrolling?
optionalscrolling?:ScrollingConfig
Virtual (default) or infinite scrolling.
selection?
optionalselection?:SelectionConfig
sorting?
optionalsorting?:SortingConfig
summaries?
optionalsummaries?:SummaryDef<TRow>[]
Footer totals over the filtered rows.
tree?
optionaltree?:TreeDataConfig<TRow>
Hierarchical rows (Enterprise, P1.4): each row points at its parent, the
grid renders the tree. Mutually exclusive with grouping — tree wins and
grouping is ignored (reported under debugMode). Client row model only.
virtualization?
optionalvirtualization?:VirtualizationConfig
worker?
optionalworker?:WorkerConfig