[Table] MatTableDataSource constructor should include MatSort, MatPaginator
- Lingua principale
- TypeScript
- Stelle
- 25k
- Fork
- 6.8k
- Merge medio
- 1g 8h
- PR unite (30g)
- 91
Descrizione
#### 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?
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia individuando il punto di ingresso di MatTableDataSource e i test esistenti, quindi esamina come MatSort e MatPaginator vengono attualmente assegnati dopo la costruzione. Il lavoro è completo quando il costruttore accetta facoltativamente questi oggetti e i test coprono la costruzione con ogni combinazione supportata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- angular, typescript
- Ambito
- frontend
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100