bug(mat-chip): mat-chip does not react to [selected] binding when the mat-chip-list also contains a formControl (e.g.) official autocomplete example
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
#### Reproduction
This example is copied directly from the official "Chips Autocomplete" example ([https://material.angular.io/components/chips/examples]). I have just stripped some of the unnecessary bits for a minimal example.
The example shows 3 copies of same mat-chip-list showing how mat-chips do not react to [selected] binding when a mat-input with either [formControl] or [matAutocomplete] bindings are included in the mat-chip-list.
All the existing chips should be selected in all copies. The only difference between the 3 is what bindings are included in the
https://components-issue-y2hda6.stackblitz.io
Steps to reproduce:
1. Create a mat-chip-list with mat-chips that have a [selected] binding (or just static flag set)
2. Add a with either [matAutocomplete] or [formControl]
3. The mat-chips no longer reflect their "selected" css styles (although appear to be internally in selected state)
#### Expected Behavior
For all chips to be selected in all copies
#### Actual Behavior
Presence of [formControl] or [matAutocomplete] prevents css styles being applied to selected chips
#### Environment
- Angular: 11.1.1
- All OS/Browser
コントリビューションガイド
調査の方向性
リンクされた StackBlitz の再現から始め、公式の Chips Autocomplete の例と比較してください。入力で [formControl] または [matAutocomplete] を使用した場合の mat-chip-list と mat-chip の動作を調査してください。3 つの再現ケースすべてで、既存のチップに選択時の CSS スタイルが適用されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 35/100