feat(cdk/tree): expose getDescendants method of CdkTree just like the deprecated TreeControl class
- Dominant language
- TypeScript
- Stars
- 25k
- Forks
- 6.8k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 91
Description
### 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](https://github.com/angular/components/blob/1abb484aa72177a748eecdf9b850cc1c07d1a42b/src/cdk/tree/tree.ts#L889-L890)) 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.
Contributor guide
Research direction
Start in src/cdk/tree/tree.ts at the migrated getDescendants implementation referenced in the issue. Compare its current visibility with the deprecated TreeControl API and inspect nearby tree tests or public API conventions. Done means CdkTree exposes getDescendants for callers who previously used TreeControl.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100