(children)
| 1837 | * @returns {number} total items |
| 1838 | */ |
| 1839 | const getTotalItems = (children) => { |
| 1840 | let count = 0; |
| 1841 | for (const child of children) { |
| 1842 | if (!child.children && !child.filteredChildren) { |
| 1843 | count++; |
| 1844 | } else { |
| 1845 | if (child.children) count += getTotalItems(child.children); |
| 1846 | if (child.filteredChildren) count += child.filteredChildren; |
| 1847 | } |
| 1848 | } |
| 1849 | return count; |
| 1850 | }; |
| 1851 | |
| 1852 | /** |
| 1853 | * Returns collapsed children. |
no outgoing calls
no test coverage detected