[Table] MatTableDataSource constructor should include MatSort, MatPaginator
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
#### Bug, feature request, or proposal:
feature request
#### What is the expected behavior?
Have a constructor that, at least optionally, takes a MatSort and/or a MatPaginator as parameters.
#### What is the current behavior?
Currently, you have to create a new MatTableDataSource with only data as a parameter. However, you always have to set the matSort and paginator of the MatTableDataSource after construction. I had to make a class that extends this class to have this, which seems superfluous.
#### What are the steps to reproduce?
#### What is the use-case or motivation for changing an existing behavior?
To make the creation of MatTableDataSources easier.
#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular: 5.0.1
Material: 5.0.0-rc0
OS: Windows 10 Pro
TypeScript: 2.6.1
Browser: Google Chrome 62.0.3202.94 (Official Build) (64-bit)
#### Is there anything else we should know?
Beitragsleitfaden
Rechercherichtung
Beginne damit, den Einstiegspunkt von MatTableDataSource und die vorhandenen Tests zu finden, und untersuche anschließend, wie MatSort und MatPaginator derzeit nach der Konstruktion zugewiesen werden. Die Aufgabe ist abgeschlossen, wenn der Konstruktor diese Objekte optional akzeptiert und Tests die Konstruktion mit jeder unterstützten Kombination abdecken.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, typescript
- Bereich
- frontend
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100