@kanunilabs/datagrid-react / GridHeaderProps
Interface: GridHeaderProps<TRow>
Type Parameters
TRow
TRow = GridRowData
Properties
bandOffset?
optionalbandOffset?:number
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>[]
checkboxColumn?
optionalcheckboxColumn?:boolean
Leading select-all checkbox column.
detailColumn?
optionaldetailColumn?:boolean
Leading expander column for master-detail (Enterprise).
draggable?
optionaldraggable?:boolean
Make headers draggable onto the group panel.
filteredColumns?
optionalfilteredColumns?:string[]
Column ids that currently have a filter (funnel shown as active).
filterIconMode?
optionalfilterIconMode?:"hover"|"always"
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?
optionalheaderFilter?:boolean
Renders the funnel button that opens the distinct-value popup.
layout
layout:
ColumnLayout<TRow>
leadingSpacer
leadingSpacer:
number
onAutoFit?
optionalonAutoFit?: (columnId) =>void
Double-click on the resize handle, and the context-menu "best fit" item.
Parameters
columnId
string
Returns
void
onHeaderContextMenu?
optionalonHeaderContextMenu?: (columnId,event) =>void
Right-click on a header cell (Enterprise header menu).
Parameters
columnId
string
event
MouseEvent
Returns
void
onOpenFilter?
optionalonOpenFilter?: (columnId,anchor) =>void
Parameters
columnId
string
anchor
HTMLElement
Returns
void
onReorder?
optionalonReorder?: (columnId,beforeId) =>void
beforeId === undefined means "move to the end".
Parameters
columnId
string
beforeId
string | undefined
Returns
void
onResize?
optionalonResize?: (columnId,width,finished?) =>void
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
Parameters
columnId
string
additive
boolean
Returns
void
onToggleSelectAll?
optionalonToggleSelectAll?: () =>void
Returns
void
reorderable?
optionalreorderable?:boolean
Drag a header onto another to change the column order.
resizable?
optionalresizable?:boolean
Drag handle on the trailing edge of each header.
rowNumberColumn?
optionalrowNumberColumn?:boolean
Leading row-number column (gap analysis P3.5).
rowNumberHeader?
optionalrowNumberHeader?:ReactNode
What the row-number column's header shows. Defaults to #.
selectAllState?
optionalselectAllState?:"all"|"some"|"none"
'all' | 'some' | 'none' — drives the tri-state select-all box.
sort
sort:
SortDescriptor[]
sortable
sortable:
boolean
stickyInsets?
optionalstickyInsets?:ReadonlyMap<string,number>
Inset per STICKY center column, by id. See RenderGeometry.stickyInsets.
trailingSpacer
trailingSpacer:
number