[Table] MatTableDataSource constructor should include MatSort, MatPaginator
- Lenguaje dominante
- TypeScript
- Estrellas
- 25k
- Forks
- 6.8k
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 91
Descripción
#### 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?
Guía de contribución
Línea de trabajo
Comienza localizando el punto de entrada de MatTableDataSource y sus pruebas existentes; después, inspecciona cómo se asignan actualmente MatSort y MatPaginator después de la construcción. Se considera terminado cuando el constructor acepta opcionalmente esos objetos y las pruebas cubren la construcción con cada combinación compatible.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- angular, typescript
- Área
- frontend
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100