bug(mat-select): on openedChange, the panel value is wrong
- 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?
- [x] Yes, this behavior used to work in the previous version
### The previous version in which this bug was not present was
18.1.2
### Description
When triggering the event "openedChange," the panel value is defined when the panel is closed (openedChange emits `false`) and the panel value is undefined when the panel is open (openedChange emits `true`).
A current workaround is setting your logic based around the panel in a setTimeout function. My use case for this is setting an event listener on the scroll for the panel.
### Reproduction
StackBlitz link:
https://stackblitz.com/edit/brlpethk?file=src%2Fexample%2Fselect-custom-trigger-example.html
Steps to reproduce:
1. Open panel
2. See that the panel value is undefined
3. Close panel
4. See that the panel value is defined
### Expected Behavior
When the panel opens, the panel value should be defined
### Actual Behavior
The panel value is undefined
### Environment
- Angular: 19.2.14
- CDK/Material: 19.2.18
- Browser(s): Firefox
- Operating System (e.g. Windows, macOS, Ubuntu): Mac 14.7.6
Guía de contribución
Línea de trabajo
Comienza con la reproducción vinculada de StackBlitz e inspecciona el manejo de mat-select en torno al evento openedChange. Reproduce la secuencia de apertura y cierre en Firefox. Después, verifica que el valor del panel esté definido al abrirse y añade o actualiza la cobertura para la regresión.
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
- 40/100