Collapses a subtree rooted at given data node recursively.
(dataNode: T)
| 89 | |
| 90 | /** Collapses a subtree rooted at given data node recursively. */ |
| 91 | collapseDescendants(dataNode: T): void { |
| 92 | let toBeProcessed = [dataNode]; |
| 93 | toBeProcessed.push(...this.getDescendants(dataNode)); |
| 94 | this.expansionModel.deselect(...toBeProcessed.map(value => this._trackByValue(value))); |
| 95 | } |
| 96 | |
| 97 | protected _trackByValue(value: T | K): K { |
| 98 | return this.trackBy ? this.trackBy(value as T) : (value as K); |
nothing calls this directly
no test coverage detected