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.

PropType
The colspan for the header.
number
The header's associated column object.
Column<
TData,
TValue,
TColumnMeta
>
The depth of the header, zero-indexed based.
number
Returns the rendering context (or props) for column-based components like headers, footers and filters.
      () => {
      column: Column<
      TData,
      TValue,
      TColumnMeta
      >
      header: Header<
      TData,
      TValue,
      TColumnMeta
      >
      table: TableInstance<TData>
      }
      Returns the leaf headers hierarchically nested under this header.
          () => Header<
          TData,
          any,
          TColumnMeta
          >[]
          Returns an event handler function that can be used to resize the header. It can be used as an:
          -
          onMouseDown handler
          -
          onTouchStart handler

          The dragging and release events are automatically handled for you.
              () => (
              event: unknown,
              ) => void
              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.
                      (
                      position?:
                      | false
                      | 'left'
                      | 'right',
                      ) => number
                      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
                      number
                      Description
                      The colspan for the header.
                      Type
                      Column<
                      TData,
                      TValue,
                      TColumnMeta
                      >
                      Description
                      The header's associated column object.
                      Type
                      number
                      Description
                      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:
                              -
                              onMouseDown handler
                              -
                              onTouchStart handler

                              The 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
                                          string
                                          Description
                                          The unique identifier for the header.
                                          Type
                                          number
                                          Description
                                          The index for the header within the header group.
                                          Type
                                          boolean
                                          Description
                                          A boolean denoting if the header is a placeholder header.
                                          Type
                                          string
                                          Description
                                          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
                                          number
                                          Description
                                          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.