Function
findMaxDepth
(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 | |
Tested by
no test coverage detected