getHeaderDepth
Commons
stable
Recursively computes the maximum nesting depth of a DataTable header column tree. Used to calculate the rowspan for parent columns in multi-level header rows.
API
Signature
Signature TypeScript complète, extraite du fichier util.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- itemrequisIInternalDataTableHeader
- The header item to measure. Recursively traverses its children array.
- depthnumber0
- The current recursion depth. Defaults to 0; increases by 1 at each level.
API
Valeur de retour
La valeur retournée par cet util.
- The maximum depth of the subtree rooted at item (0 = leaf, 1 = one level of children, etc.).
Usage
Exemples
Extraits de code prêts à coller.
Measure a two-level header tree