Documentation

@kanunilabs/datagrid-react


@kanunilabs/datagrid-react / GridPinnedRowsProps

Interface: GridPinnedRowsProps<TRow>

Type Parameters

TRow

TRow = GridRowData

Properties

ariaRowBase

ariaRowBase: number

Rows that precede this block in the ARIA row numbering: the header rows for a top block, plus the pinned-top rows and every data row for a bottom one.

A pinned row IS a row to a screen reader even though it is not one to the row model, so it has to take a number in the same sequence — and the data rows have to move down to make room. DataGrid does both from one count.


bandOffset?

optional bandOffset?: number

Pixels of BAND rows above. Zero on a grid without column bands.


centerColumns

centerColumns: ReactColumnRuntime<TRow>[]


centerIndices?

optional centerIndices?: readonly number[]


checkboxColumn?

optional checkboxColumn?: boolean


columnModel

columnModel: ColumnModel<TRow>


detailColumn?

optional detailColumn?: boolean


gridId

gridId: string


headerRowsBetween

headerRowsBetween: number

How many header-height rows sit between this block and its sticky edge: above, the header (1) plus the filter row when shown (2); below, the footer row (1) or nothing (0).

A count rather than a pixel offset because the header's height is a THEME token — --dg-header-height changes with the theme and the density, and a number measured in JS at render time would be the previous theme's.


layout

layout: ColumnLayout<TRow>


leadingSpacer

leadingSpacer: number


onUserRowContextMenu?

optional onUserRowContextMenu?: (key, row, event) => void

Parameters

key

RowKey

row

TRow

event

MouseEvent

Returns

void


rowClassFor?

optional rowClassFor?: (node, index, userKey) => string | undefined

The app's rowClassName (P-8), resolved by DataGrid; userKey is the data row's key for a user-pinned row.

Parameters

node

DataRowNode<TRow>

index

number

userKey

RowKey | null

Returns

string | undefined


rowHeight

rowHeight: number


rowKeys?

optional rowKeys?: readonly (RowKey | null)[]

Parallel to rows: null for a row the app passed, the data row's key for one the USER pinned (G-CORE-05) — only those open the pin menu.


rowNumberColumn?

optional rowNumberColumn?: boolean


rows

rows: readonly TRow[]


side

side: "top" | "bottom"

Which edge — decides the sticky side and the border.


statusColumn?

optional statusColumn?: boolean

rowStatus.icons: the leading status column is showing.


stickyInsets?

optional stickyInsets?: ReadonlyMap<string, number>


trailingSpacer

trailingSpacer: number