[Table] MatTableDataSource constructor should include MatSort, MatPaginator
- Langage dominant
- TypeScript
- Étoiles
- 25k
- Forks
- 6.8k
- Merge moyen
- 1 j 8 h
- PR mergées (30 j)
- 91
Description
#### 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?
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par localiser le point d’entrée de MatTableDataSource et ses tests existants, puis examinez comment MatSort et MatPaginator sont actuellement assignés après la construction. Le travail est terminé lorsque le constructeur accepte facultativement ces objets et que les tests couvrent la construction avec chaque combinaison prise en charge.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- angular, typescript
- Domaine
- frontend
- Type d'issue
- Fonctionnalité
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100