angular / angular/components

bug(mat-autocomplete): missing selection indicator (highlight + check icon) when using mat-autocomplete with mat-optgroup

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

説明

### Is this a regression?

- [ ] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

14

### Description

v15 introduced an indicator of the currently selected item:
![image](https://github.com/angular/components/assets/32791888/3f1e8ce5-5d32-4503-afdf-1c0d859f7360)
However, this indicator is missing when, instead of flat mat-options, we're using mat-optgroup with mat-options:
![image](https://github.com/angular/components/assets/32791888/0049610c-767c-4ffe-9b18-d0ad7446a56f)

### Reproduction

The repro is even in the official documentation of any version higher than v14:
https://v15.material.angular.io/components/autocomplete/examples

### Expected Behavior

We should see the indicator of a selected item even when we're using mat-optgroup

### Actual Behavior

Missing selection indicator when using mat-autocomplete with mat-optgroup

### Environment

- Angular: v15+
- CDK/Material: v15+

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

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

調査の方向性

Issue にリンクされている Autocomplete の例から始め、フラットな mat-options のケースと mat-optgroup のケースを比較します。Angular/Material v15+ で欠落しているハイライトとチェックアイコンを再現し、その後、グループ化されたオプションでも選択項目のインジケーターが表示されることを確認します。

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

評価

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

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

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