Documentation

@kanunilabs/datagrid-react


@kanunilabs/datagrid-react / GridHeaderProps

Interface: GridHeaderProps<TRow>

Defined in: datagrid-react/src/components/GridHeader.tsx:40

Type Parameters

TRow

TRow = GridRowData

Properties

bandOffset?

optional bandOffset?: number

Defined in: datagrid-react/src/components/GridHeader.tsx:47

Height of the band rows above, in px. The header sticks BELOW them rather than at 0 — otherwise scrolling down slides the header up over the bands it belongs to.


centerColumns

centerColumns: ReactColumnRuntime<TRow>[]

Defined in: datagrid-react/src/components/GridHeader.tsx:48


checkboxColumn?

optional checkboxColumn?: boolean

Defined in: datagrid-react/src/components/GridHeader.tsx:59

Leading select-all checkbox column.


detailColumn?

optional detailColumn?: boolean

Defined in: datagrid-react/src/components/GridHeader.tsx:61

Leading expander column for master-detail (Enterprise).


draggable?

optional draggable?: boolean

Defined in: datagrid-react/src/components/GridHeader.tsx:70

Make headers draggable onto the group panel.


filteredColumns?

optional filteredColumns?: string[]

Defined in: datagrid-react/src/components/GridHeader.tsx:72

Column ids that currently have a filter (funnel shown as active).


filterIconMode?

optional filterIconMode?: "hover" | "always"

Defined in: datagrid-react/src/components/GridHeader.tsx:80

When the funnel is visible. 'hover' (default) keeps the header clean and reveals it on hover/keyboard focus; 'always' pins it. A column that IS filtered shows its funnel in both modes — hiding the only indicator that a filter is active would make rows disappear for no visible reason.


headerFilter?

optional headerFilter?: boolean

Defined in: datagrid-react/src/components/GridHeader.tsx:57

Renders the funnel button that opens the distinct-value popup.


layout

layout: ColumnLayout<TRow>

Defined in: datagrid-react/src/components/GridHeader.tsx:41


leadingSpacer

leadingSpacer: number

Defined in: datagrid-react/src/components/GridHeader.tsx:51


onAutoFit?

optional onAutoFit?: (columnId) => void

Defined in: datagrid-react/src/components/GridHeader.tsx:90

Double-click on the resize handle, and the context-menu "best fit" item.

Parameters

columnId

string

Returns

void


onHeaderContextMenu?

optional onHeaderContextMenu?: (columnId, event) => void

Defined in: datagrid-react/src/components/GridHeader.tsx:92

Right-click on a header cell (Enterprise header menu).

Parameters

columnId

string

event

MouseEvent

Returns

void


onOpenFilter?

optional onOpenFilter?: (columnId, anchor) => void

Defined in: datagrid-react/src/components/GridHeader.tsx:73

Parameters

columnId

string

anchor

HTMLElement

Returns

void


onReorder?

optional onReorder?: (columnId, beforeId) => void

Defined in: datagrid-react/src/components/GridHeader.tsx:84

beforeId === undefined means "move to the end".

Parameters

columnId

string

beforeId

string | undefined

Returns

void


onResize?

optional onResize?: (columnId, width, finished?) => void

Defined in: datagrid-react/src/components/GridHeader.tsx:88

finished is false while dragging, true once on release. Absent = one-shot.

Parameters

columnId

string

width

number

finished?

boolean

Returns

void


onSort

onSort: (columnId, additive) => void

Defined in: datagrid-react/src/components/GridHeader.tsx:55

Parameters

columnId

string

additive

boolean

Returns

void


onToggleSelectAll?

optional onToggleSelectAll?: () => void

Defined in: datagrid-react/src/components/GridHeader.tsx:68

Returns

void


reorderable?

optional reorderable?: boolean

Defined in: datagrid-react/src/components/GridHeader.tsx:82

Drag a header onto another to change the column order.


resizable?

optional resizable?: boolean

Defined in: datagrid-react/src/components/GridHeader.tsx:86

Drag handle on the trailing edge of each header.


rowNumberColumn?

optional rowNumberColumn?: boolean

Defined in: datagrid-react/src/components/GridHeader.tsx:63

Leading row-number column (gap analysis P3.5).


rowNumberHeader?

optional rowNumberHeader?: ReactNode

Defined in: datagrid-react/src/components/GridHeader.tsx:65

What the row-number column's header shows. Defaults to #.


selectAllState?

optional selectAllState?: "all" | "some" | "none"

Defined in: datagrid-react/src/components/GridHeader.tsx:67

'all' | 'some' | 'none' — drives the tri-state select-all box.


sort

sort: SortDescriptor[]

Defined in: datagrid-react/src/components/GridHeader.tsx:53


sortable

sortable: boolean

Defined in: datagrid-react/src/components/GridHeader.tsx:54


stickyInsets?

optional stickyInsets?: ReadonlyMap<string, number>

Defined in: datagrid-react/src/components/GridHeader.tsx:50

Inset per STICKY center column, by id. See RenderGeometry.stickyInsets.


trailingSpacer

trailingSpacer: number

Defined in: datagrid-react/src/components/GridHeader.tsx:52