angular / angular/components

feat(mat-tab): ability to set mat-tab height to grow to fill available area within mat-tab-group

Abierto
#27,162 9 comentarios 17 reacciones 0 asignados Ver en GitHub
feature P4
Lenguaje dominante
TypeScript
Estrellas
25k
Forks
6.8k
Merge medio
1 d 8 h
PR fusionados (30 d)
91

Descripción

### Feature Description

Currently, the best solution I've found is to override:

`::ng-deep .mat-mdc-tab-body-wrapper { flex-grow: 1; }`

See this [reproduction](https://stackblitz.com/edit/1kawpj?file=src%2Fexample%2Ftab-group-basic-example.html,src%2Fexample%2Ftab-group-basic-example.scss).

If `flex-grow: 1` was added to the body wrapper or an API option provided that allowed that behaviour without using `::ng-deep`, that would be great. Thanks.

### Use Case

Situations where I want a tab group to occupy the full height available and have its contents expand to the available height. E.g. a table or text editing component inside a tab that is scrollable but should occupy as much of the height available as possible.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con la reproducción vinculada de StackBlitz, especialmente con src/example/tab-group-basic-example.html y src/example/tab-group-basic-example.scss, e inspecciona cómo mat-tab-group distribuye su body. Compara el workaround existente de ::ng-deep flex-grow con el comportamiento solicitado; se considera completado cuando un grupo de pestañas puede ocupar toda la altura disponible y su contenido puede expandirse sin ese override.

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
48/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.