feat(cdk/tree): expose getDescendants method of CdkTree just like the deprecated TreeControl class
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
### 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.
Beitragsleitfaden
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- frontend
- Issue-Typ
- Feature
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 45/100