bug(cdkMenu): menu template context is not updated when cdkMenuTriggerData is changed
- Lingua principale
- TypeScript
- Stelle
- 25k
- Fork
- 6.8k
- Merge medio
- 1g 8h
- PR unite (30g)
- 91
Descrizione
### 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
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia dalla riproduzione collegata su GitHub o StackBlitz e segui come cdkMenuTriggerData raggiunge il template del menu Angular CDK. Riproduci il contatore obsoleto dopo aver modificato il valore, quindi verifica che, riaprendo il menu, venga mostrato il valore corrente del contatore e che i test pertinenti passino.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- angular, typescript
- Ambito
- frontend
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 42/100