feat(cdk/table): Possibility to add custom context to each row cell
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
### Feature Description
Currently, the only context passed to the cell is: count, first, last, even, odd. However, this only works properly without pagination. If the table has pagination, we're stuck with these basic variables that are only relative to the page in display and not relative to the whole dataset being used, under the hood.
I'd would suggest giving the possibility to customize this behaviour via an optional method that is called when you run "_updateRowIndexContext". This new optional method would receive the context object that you currently have and expand on it according to what each project requires.
### Use Case
_No response_
Beitragsleitfaden
Rechercherichtung
Beginne damit, die Angular CDK-Tabellenimplementierung zu finden, die _updateRowIndexContext enthält, und lies nach, wie der aktuelle Kontext für count, first, last, even und odd aufgebaut wird. Ermittle die optionale Anpassungs-API und füge Abdeckung für paginierte Zeilen hinzu; fertig ist die Aufgabe, wenn Projekte den Kontext um datensatzrelative Werte erweitern können, ohne den bestehenden Kontext zu beschädigen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- frontend
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 42/100