bug(MatList): content projected mat-list-items do not apply mat-mdc-list-item-interactive
- 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.6
### Description
After updating to Angular v15 projecting `mat-list-items` into the `mat-nav-list` does no longer work as expected. The hover effect is not working as the class `mat-mdc-list-item-interactive` is not added.
```
```
### Reproduction
StackBlitz link: https://stackblitz.com/edit/ng5v1w-bbsdvs?file=src%2Fexample%2Flist-overview-example.html
Steps to reproduce:
1. hover over not working items
### Expected Behavior
Content projected items should behave like they were added "directly".
### Actual Behavior
`Mat-list-items` do not get the `mat-mdc-list-item-interactive` class and therefore displayed as non-interactive.
### Environment
- Angular: 15.2.9
- CDK/Material: 15.2.9
- Browser(s): Firefox/Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows
Beitragsleitfaden
Rechercherichtung
Beginne mit der verknüpften StackBlitz-Reproduktion, insbesondere mit src/example/list-overview-example.html, und vergleiche projizierte mat-list-items mit direkt in mat-nav-list deklarierten Items. Stelle das fehlende Hover-Verhalten nach und verfolge den Projektionspfad des Listenelements; fertig ist es, wenn projizierte Items mat-mdc-list-item-interactive erhalten und sich wie direkt hinzugefügte Items verhalten.
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