bug(mat-select): on openedChange, the panel value is wrong
- 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?
- [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
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par la reproduction StackBlitz liée et examinez la gestion de mat-select autour de l’événement openedChange. Reproduisez la séquence d’ouverture et de fermeture dans Firefox. Vérifiez ensuite que la valeur du panneau est définie lors de l’ouverture, puis ajoutez ou mettez à jour la couverture de la régression.
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
- 40/100