Documentation

@kanunilabs/datagrid-react


@kanunilabs/datagrid-react / DataGridCoreConfig

Interface: DataGridCoreConfig<TRow>

Defined in: datagrid-core/dist/index.d.ts:1095

Type Parameters

TRow

TRow = GridRowData

Properties

asyncTransactionWait?

optional asyncTransactionWait?: number

Defined in: datagrid-core/dist/index.d.ts:1162

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>[]

Defined in: datagrid-core/dist/index.d.ts:1100


dataSource

dataSource: TRow[] | DataSource<TRow>

Defined in: datagrid-core/dist/index.d.ts:1097


debugMode?

optional debugMode?: boolean

Defined in: datagrid-core/dist/index.d.ts:1153

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


defaultColumnDef?

optional defaultColumnDef?: Partial<GridColumnDef<TRow>>

Defined in: datagrid-core/dist/index.d.ts:1101


getRowHeight?

optional getRowHeight?: (node, index) => number | undefined

Defined in: datagrid-core/dist/index.d.ts:1118

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

Defined in: datagrid-core/dist/index.d.ts:1096


grouping?

optional grouping?: GroupingConfig

Defined in: datagrid-core/dist/index.d.ts:1124


locale?

optional locale?: string

Defined in: datagrid-core/dist/index.d.ts:1144

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-ATde), and anything unknown falls back to English rather than failing to render.


masterDetail?

optional masterDetail?: MasterDetailConfig

Defined in: datagrid-core/dist/index.d.ts:1132

Expandable detail panels under rows. Enterprise (P9).


messages?

optional messages?: Partial<GridDictionary>

Defined in: datagrid-core/dist/index.d.ts:1151

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

Defined in: datagrid-core/dist/index.d.ts:1133


remote?

optional remote?: RemoteConfig

Defined in: datagrid-core/dist/index.d.ts:1122

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


rowHeight?

optional rowHeight?: number

Defined in: datagrid-core/dist/index.d.ts:1104

The STANDARD row height in px. Default 28.


rowKey

rowKey: RowKeyResolver<TRow>

Defined in: datagrid-core/dist/index.d.ts:1099

REQUIRED: stable row identity — selection, editing and live updates hang off it.


scrolling?

optional scrolling?: ScrollingConfig

Defined in: datagrid-core/dist/index.d.ts:1135

Virtual (default) or infinite scrolling.


selection?

optional selection?: SelectionConfig

Defined in: datagrid-core/dist/index.d.ts:1123


sorting?

optional sorting?: SortingConfig

Defined in: datagrid-core/dist/index.d.ts:1102


summaries?

optional summaries?: SummaryDef<TRow>[]

Defined in: datagrid-core/dist/index.d.ts:1137

Footer totals over the filtered rows.


tree?

optional tree?: TreeDataConfig<TRow>

Defined in: datagrid-core/dist/index.d.ts:1130

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

Defined in: datagrid-core/dist/index.d.ts:1119


worker?

optional worker?: WorkerConfig

Defined in: datagrid-core/dist/index.d.ts:1120