angular / angular/components

feat(Mat-Table): Allow for adding multiple TBODY within Mat-Table

Abierto
#28,195 1 comentario 5 reacciones 0 asignados Ver en GitHub
area: cdk/table feature P3
Lenguaje dominante
TypeScript
Estrellas
25k
Forks
6.8k
Merge medio
1 d 8 h
PR fusionados (30 d)
91

Descripción

### Feature Description

In the current cdk Table implementation we can only have on `` with a `matRowDef`. This will generate a TBODY element with the TR's inside.
That works fine for most use case.

I would like to be able to add a second TBODY with a selection of the rows of the datasource (based on a filter) so that I have 2 groups of rows within the same table.

I tried using the When option in matRowDef but that doesn't result in 2 TBODY's, but it comes close into what I am looking for.

### Use Case

I am having a list of Categories of which the top 3 can have primary flag. Those are display at the top, then row 4 until X is the non primary Categories.
I enabled drag and drop and I only want to be able to order the Primary rows within their TBODY and the non-primary rows in their TBODY. So you can't accidentally drop a Non primary row into a primary block.

You can control if a category is primary or not by editing the Category itself.

So to sum up feature request:

- Allow for multiple TBODYs which can have a filtered collection of the datasource
- Allow Drag and drop within that tbody only
image

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con la implementación de CDK Table y la opción matRowDef When para entender cómo se genera actualmente el único TBODY. Define cómo deben renderizarse varios grupos de datasource filtrados y cómo debe mantenerse el arrastrar y soltar dentro de cada TBODY; se considera terminado cuando ambos comportamientos funcionan para los grupos de categorías primarios y no primarios descritos.

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
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.