parseHeaderItems
DataTable
stable
Flatten a tree of `IInternalDataTableHeader` nodes into a 2-D row matrix, computing `rowspan` and `colspan` values for each cell so they render correctly in a multi-level `<thead>`.
API
Signature
Full TypeScript signature sourced from the util file.
API
Parameters
Input parameters accepted by this util.
- itemsrequiredArray<IInternalDataTableHeader>
- Top-level headers, potentially containing nested `children` arrays that define sub-columns.
- maxDepthrequirednumber
- The total number of header rows in the table. Leaf headers without children receive a `rowspan` that fills the remaining depth.
API
Return value
The value returned by this util.
- A 2-D array where each inner array is one `<tr>` row of headers, enriched with computed `rowspan` and `colspan`.
Usage
Examples
Ready-to-paste usage snippets.
Build multi-level header rows