components
components copied to clipboard
feat(cdk/tree): expose getDescendants method of CdkTree just like the deprecated TreeControl class
trafficstars
Feature Description
Before v18.2, TreeControl was used to control the whole tree and it exposes the getDescendants publicly. After v18.2, the getDescendants was migrated to CdkTree (source) but it was made private. Hence, all code that depends on getDescendants function will break and have no migration path for TreeControl users.
Use Case
Allows developers to get all children and grandchildren without writing his own code or duplicating unnecessary code.