MCPcopy Index your code
hub / github.com/TanStack/table / findMaxDepth

Function findMaxDepth

packages/table-core/src/core/headers.ts:498–508  ·  view source on GitHub ↗
(columns: Column<TData, unknown>[], depth = 1)

Source from the content-addressed store, hash-verified

496 let maxDepth = 0
497
498 const findMaxDepth = (columns: Column<TData, unknown>[], depth = 1) => {
499 maxDepth = Math.max(maxDepth, depth)
500
501 columns
502 .filter((column) => column.getIsVisible())
503 .forEach((column) => {
504 if (column.columns?.length) {
505 findMaxDepth(column.columns, depth + 1)
506 }
507 }, 0)
508 }
509
510 findMaxDepth(allColumns)
511

Callers 1

buildHeaderGroupsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected