angular / angular/components

feat(mat-select): add smart panel width based on trigger and largest option size

Abierto
#29,569 1 comentario 3 reacciones 0 asignados Ver en GitHub
area: material/select 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 `panelWidth` can be one of three:
1. Trigger width
2. Largest option width
3. Custom provided width in numbers

What I am missing is - minimum width as trigger width and grow until max option size (if needed)

### Use Case

When having dynamic options texts sometimes they might be larger than trigger width and I want the largest option behavior.
Sometimes they are smaller than trigger width and I want the trigger width behavior to avoid really small select panels.
Which means I actually need: min panel width = trigger width with potential grow (not shrink!) to the largest option width.

Can be with a new `panelWidth` option or even `minPanelWidth` input (can have a complimenting `maxPanelWidth` too for completeness)

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza leyendo el manejo existente de panelWidth de mat-select y los comportamientos trigger-width y largest-option descritos en el issue. Define e implementa una API o una opción que mantenga el panel al menos tan ancho como el trigger y permita que crezca hasta alcanzar el ancho de la opción más grande; después, verifica el comportamiento tanto para opciones más anchas como más estrechas.

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
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.