bug(cdkMenu): menu template context is not updated when cdkMenuTriggerData is changed
- Langage dominant
- TypeScript
- Étoiles
- 25k
- Forks
- 6.8k
- Merge moyen
- 1 j 8 h
- PR mergées (30 j)
- 91
Description
### Is this a regression?
- [ ] Yes, this behavior used to work in the previous version
### The previous version in which this bug was not present was
_No response_
### Description
When cdkMenuTriggerData is used to pass additional context to a menu template the template context is not update when the data is changed.
### Reproduction
[GitHub](https://github.com/ghostlytalamaur/angular-cdk-menu-data-bug)
[StackBlitz](https://stackblitz.com/edit/angular-s5r2am-ax9zgm?file=src/main.ts)
Steps to reproduce:
1. Open the application.
2. Click the button "Click Me!". Menu with initial counter value is shown.
3. Click "Increment" button.
4. Click "Click Me!" button second time
### Expected Behavior
Counter value in the context menu should be in sync with the value on the "Click Me!" button.
### Actual Behavior
Counter value in the context menu keep initial value and is not updated when context changes.
### Environment
- Angular: 15.0.0
- CDK/Material: 15.0.2
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par la reproduction GitHub ou StackBlitz liée et suivez la façon dont cdkMenuTriggerData parvient jusqu’au modèle de menu Angular CDK. Reproduisez le compteur obsolète après avoir modifié la valeur, puis vérifiez que la réouverture du menu affiche la valeur actuelle du compteur et que les tests concernés passent.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- angular, typescript
- Domaine
- frontend
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 42/100