feat(Menu): Option to have it the same width as the trigger
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
### 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.
Beitragsleitfaden
Rechercherichtung
Beginne mit der Übersicht zum Angular CDK-Menü und dem StackBlitz-Beispiel, um das aktuelle Größenverhalten nachzustellen; Issue 26336 bietet verwandten Kontext zur Konfiguration der Menübreite. Als erledigt gilt die Aufgabe, wenn das Menü die Breite des Trigger-Containers übernehmen kann, ohne eine feste Pixelbreite zu erfordern, und das Verhalten in einem geeigneten Beispiel oder Test demonstriert wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, typescript
- Bereich
- frontend
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100