1 | function countRowSpan(columns) {
|
2 | let maximumCount = 0;
|
3 |
|
4 | columns.forEach(column => {
|
5 | if (column.children && column.children.length) {
|
6 | maximumCount = Math.max(
|
7 | maximumCount,
|
8 | countRowSpan(column.children)
|
9 | );
|
10 | }
|
11 | });
|
12 |
|
13 | return maximumCount + 1;
|
14 | }
|
15 |
|
16 | export default countRowSpan;
|