angular / angular/components

bug(MatList): content projected mat-list-items do not apply mat-mdc-list-item-interactive

オープン
#27,608 コメント 4 件 リアクション 5 件 担当者 0 名 GitHub で見る
area: material/list P3
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

### 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.

```

google
angular

```

### 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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

リンクされている StackBlitz の再現、特に src/example/list-overview-example.html から始め、投影された mat-list-items と mat-nav-list に直接宣言された項目を比較してください。不足しているホバー動作を再現し、リスト項目の投影経路を追跡してください。投影された項目が mat-mdc-list-item-interactive を受け取り、直接追加された項目と同じように動作すれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。