feat(Menu): Option to have it the same width as the trigger
- Langage dominant
- TypeScript
- Étoiles
- 25k
- Forks
- 6.8k
- Merge moyen
- 1 j 8 h
- PR mergées (30 j)
- 91
Description
### 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.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par la présentation du menu Angular CDK et l’exemple StackBlitz afin de reproduire le comportement actuel concernant les dimensions ; issue 26336 fournit un contexte connexe sur la configuration de la largeur du menu. La tâche est considérée comme terminée lorsque le menu peut prendre la largeur du conteneur du trigger sans nécessiter une largeur fixe en pixels, avec ce comportement démontré dans un exemple ou un test approprié.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- angular, typescript
- Domaine
- frontend
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 45/100