extractLeaves

DataTable
stable

Recursively collects all leaf (childless) headers from a nested DataTable header tree into a flat array. Used to derive the rendered column list from a grouped header definition.

API

Signature

Signature TypeScript complète, extraite du fichier util.

typescript

API

Paramètres

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

item
requis
IInternalDataTableHeader
The root header node to traverse. If it has no children it is collected as a leaf; otherwise its children are recursed.
columns
Array<IInternalDataTableHeader>
[]
Accumulator array. A new empty array is created when omitted.

API

Valeur de retour

La valeur retournée par cet util.

A flat array of all leaf headers (those without children) in depth-first order.

Usage

Exemples

Extraits de code prêts à coller.

Flatten grouped headers to leaf columns

typescript