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

Signature TypeScript complète, extraite du fichier util.

typescript

API

Paramètres

Paramètres d'entrée acceptés par cet util.

items
requis
Array<IInternalDataTableHeader>
Top-level headers, potentially containing nested `children` arrays that define sub-columns.
maxDepth
requis
number
The total number of header rows in the table. Leaf headers without children receive a `rowspan` that fills the remaining depth.

API

Valeur de retour

La valeur retournée par cet util.

A 2-D array where each inner array is one `<tr>` row of headers, enriched with computed `rowspan` and `colspan`.

Usage

Exemples

Extraits de code prêts à coller.

Build multi-level header rows

typescript