Header
Header objects are instances representing column headers in the table. They are generated by the table and contain references to their associated column, header group, and rendering context. See the Headers guide for usage examples.
API
Properties and methods for header objects. Includes column references, header group information, hierarchy details (depth, index), placeholder state, and methods to retrieve rendering context and nested leaf headers.
| Prop | Type |
|---|---|
number | |
The header's associated column object. | Column< |
The depth of the header, zero-indexed based. | number |
Returns the rendering context (or props) for column-based components like
headers, footers and filters. | () => { |
Returns the leaf headers hierarchically nested under this header. | () => Header< |
Returns an event handler function that can be used to resize the header. It can
be used as an: - onMouseDown handler- onTouchStart handlerThe dragging and release events are automatically handled for you. | () => ( |
Returns the current size of the header. | () => number |
Returns the offset measurement along the row-axis (usually the x-axis for
standard tables) for the header. This is effectively a sum of the offset
measurements of all preceding headers. | ( |
The header's associated header group object. | HeaderGroup<TData> |
The unique identifier for the header. | string |
The index for the header within the header group. | number |
A boolean denoting if the header is a placeholder header. | boolean |
If the header is a placeholder header, this will be a unique header ID that
does not conflict with any other headers across the table. | string |
The row-span for the header. | number |
The header's hierarchical sub/child headers. Will be empty if the header's
associated column is a leaf-column. | Header[] |
Type
Column<
TData,
TValue,
TColumnMeta
>
Description
The header's associated column object.
Type
numberDescription
The depth of the header, zero-indexed based.
Type
() => {
column: Column<
TData,
TValue,
TColumnMeta
>
header: Header<
TData,
TValue,
TColumnMeta
>
table: TableInstance<TData>
}
Description
Returns the rendering context (or props) for column-based components like
headers, footers and filters.
Type
() => Header<
TData,
any,
TColumnMeta
>[]
Description
Returns the leaf headers hierarchically nested under this header.
Type
() => (
event: unknown,
) => void
Description
Returns an event handler function that can be used to resize the header. It can
be used as an:
-
-
The dragging and release events are automatically handled for you.
-
onMouseDown handler-
onTouchStart handlerThe dragging and release events are automatically handled for you.
Type
() => number
Description
Returns the current size of the header.
Type
(
position?:
| false
| 'left'
| 'right',
) => number
Description
Returns the offset measurement along the row-axis (usually the x-axis for
standard tables) for the header. This is effectively a sum of the offset
measurements of all preceding headers.
Type
HeaderGroup<TData>
Description
The header's associated header group object.
Type
stringDescription
The unique identifier for the header.
Type
numberDescription
The index for the header within the header group.
Type
booleanDescription
A boolean denoting if the header is a placeholder header.
Type
stringDescription
If the header is a placeholder header, this will be a unique header ID that
does not conflict with any other headers across the table.
Type
numberDescription
The row-span for the header.
Type
Header[]
Description
The header's hierarchical sub/child headers. Will be empty if the header's
associated column is a leaf-column.