Documentation

@kanunilabs/datagrid-react


@kanunilabs/datagrid-react / DataGridCoreConfig

Interface: DataGridCoreConfig<TRow>

Type Parameters

TRow

TRow = GridRowData

Properties

asyncTransactionWait?

optional asyncTransactionWait?: 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?

optional debugMode?: boolean

Console diagnostics for integration mistakes (duplicate keys, unknown columns…).


defaultColumnDef?

optional defaultColumnDef?: Partial<GridColumnDef<TRow>>


getRowHeight?

optional getRowHeight?: (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?

optional grouping?: GroupingConfig


locale?

optional locale?: 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?

optional masterDetail?: MasterDetailConfig

Expandable detail panels under rows. Enterprise (P9).


messages?

optional messages?: 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?

optional pagination?: PaginationConfig


remote?

optional remote?: RemoteConfig

Tuning for a remote DataSource (ignored for array data).


rowHeight?

optional rowHeight?: 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?

optional scrolling?: ScrollingConfig

Virtual (default) or infinite scrolling.


selection?

optional selection?: SelectionConfig


sorting?

optional sorting?: SortingConfig


summaries?

optional summaries?: SummaryDef<TRow>[]

Footer totals over the filtered rows.


tree?

optional tree?: 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?

optional virtualization?: VirtualizationConfig


worker?

optional worker?: WorkerConfig