feat(Menu): Option to have it the same width as the trigger
- Lingua principale
- TypeScript
- Stelle
- 25k
- Fork
- 6.8k
- Merge medio
- 1g 8h
- PR unite (30g)
- 91
Descrizione
### Feature Description
A possibility to have the https://material.angular.io/cdk/menu/overview take over the width of the container that triggers it.
As an example the grey area should span the full width of the red in the following example:
Currently it seems that you have to provide a fixed width in px. Otherwise it does not work. But you don't always know the exact with of the 'trigger'.
There's an example here: https://vbqdncww.stackblitz.io
In [issue 26336](https://github.com/angular/components/issues/26336) it seems that they are overriding MAT_SELECT_CONFIG to set a `min-width: min-content;`, but have not gotten that to work yet.
### Use Case
It would enable a more consistent styling.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia dalla panoramica del menu Angular CDK e dall'esempio StackBlitz per riprodurre il comportamento attuale delle dimensioni; issue 26336 fornisce contesto correlato sulla configurazione della larghezza del menu. Il lavoro è completato quando il menu può assumere la larghezza del contenitore del trigger senza richiedere una larghezza fissa in pixel, con il comportamento dimostrato in un esempio o test appropriato.
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
- 45/100