Documentation

@kanunilabs/datagrid-react


@kanunilabs/datagrid-react / computeHeaderBands

Function: computeHeaderBands()

computeHeaderBands<TRow>(columns, depth): HeaderBandCell[][]

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

Band rows for one block of columns, outermost row first.

Two columns merge into one band cell when they are ADJACENT and their paths agree up to and including this level. Adjacency matters: moving a column out of the middle of a band splits it into two cells with the same caption, which is the honest rendering — the alternative would be a band cell that spans a column not in it.

Type Parameters

TRow

TRow = GridRowData

Parameters

columns

readonly ColumnRuntime<TRow>[]

depth

number

Returns

HeaderBandCell[][]