bug(mat-select): on openedChange, the panel value is wrong
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
### 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
Beitragsleitfaden
Rechercherichtung
Beginne mit der verknüpften StackBlitz-Reproduktion und untersuche die mat-select-Behandlung rund um das openedChange-Ereignis. Reproduziere die Sequenz zum Öffnen und Schließen in Firefox. Überprüfe anschließend, dass der Wert des Panels beim Öffnen definiert ist, und füge eine Abdeckung für die Regression hinzu oder aktualisiere sie.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, typescript
- Bereich
- frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 40/100