* If the data node is currently expanded, collapse it and all its descendants. * Otherwise, expand it and all its descendants.
(dataNode: T)
| 666 | * Otherwise, expand it and all its descendants. |
| 667 | */ |
| 668 | toggleDescendants(dataNode: T): void { |
| 669 | if (this.treeControl) { |
| 670 | this.treeControl.toggleDescendants(dataNode); |
| 671 | } else if (this._expansionModel) { |
| 672 | if (this.isExpanded(dataNode)) { |
| 673 | this.collapseDescendants(dataNode); |
| 674 | } else { |
| 675 | this.expandDescendants(dataNode); |
| 676 | } |
| 677 | } |
| 678 | } |
| 679 | |
| 680 | /** |
| 681 | * Expand the data node and all its descendants. If they are already expanded, does nothing. |
nothing calls this directly
no test coverage detected