bug(cdkMenu): menu template context is not updated when cdkMenuTriggerData is changed
- Lenguaje dominante
- TypeScript
- Estrellas
- 25k
- Forks
- 6.8k
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 91
Descripción
### 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
Guía de contribución
Línea de trabajo
Comienza con la reproducción vinculada de GitHub o StackBlitz y sigue cómo cdkMenuTriggerData llega a la plantilla de menú de Angular CDK. Reproduce el contador obsoleto después de cambiar el valor y, a continuación, verifica que al volver a abrir el menú se muestre el valor actual del contador y que las pruebas relevantes pasen.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- angular, typescript
- Área
- frontend
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 42/100