angular / angular/components

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

Aperta
#29,569 1 commento 3 reazioni 0 assegnatari Vedi su GitHub
area: material/select feature P4
Lingua principale
TypeScript
Stelle
25k
Fork
6.8k
Merge medio
1g 8h
PR unite (30g)
91

Descrizione

### 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)

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia leggendo la gestione esistente di panelWidth in mat-select e i comportamenti trigger-width e largest-option descritti nell’issue. Definisci e implementa un’API o un’opzione che mantenga il pannello largo almeno quanto il trigger, consentendogli al contempo di espandersi fino alla larghezza dell’opzione più grande, quindi verifica il comportamento sia per le opzioni più larghe sia per quelle più strette.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
angular, typescript
Ambito
frontend
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.