bug(mat-select): wrong initial values when using async object property
- 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
14.2.12
### Description
Hey everyone, if I try to access a property of an object loaded with the async pipe it appears to be empty until I click inside the mat-select element.
It's hard to explain so there's a stackblitz to show the issue.
### Reproduction
https://stackblitz.com/edit/rjpwlz?file=src%2Fexample%2Fselect-no-ripple-example.html
### Expected Behavior
The first mat-select in the example should initially display "2"
### Actual Behavior
The first mat-select seems empty until you click on it
### Environment
- Angular: 16.0.4
- CDK/Material: 16.0.3
- Browser(s): Chrome 113.0.5672.127
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 11
Beitragsleitfaden
Rechercherichtung
Beginnen Sie mit der verlinkten StackBlitz-Reproduktion und überprüfen Sie das Verhalten mit Angular 16.0.4 und CDK/Material 16.0.3. Vergleichen Sie die anfängliche Darstellung des ersten mat-select mit dem vorherigen Verhalten in 14.2.12, und betrachten Sie das Issue als abgeschlossen, wenn die asynchrone Objekteigenschaft zunächst „2“ anzeigt, ohne dass auf das Select geklickt wird.
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
- 35/100