bug(autocomplete): reset input value doesn't update the selected option
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
#### Reproduction
When an autocomplete control is reset, the selected option still hold the `.mat-selected` class.
https://stackblitz.com/edit/angular-ufhza2
Steps to reproduce:
1) Open the autocomplete
2) Select an entry
3) Click reset
4) Open the autocomplete again

#### Expected Behavior
`mat-selected` class should be removed when autocomplete is empty
#### Environment
- Angular: `10.2.0`
- CDK/Material: `10.2.5`
コントリビューションガイド
調査の方向性
まず、リンクされた StackBlitz で動作を再現します。autocomplete の項目を選択し、コントロールをリセットして、もう一度開きます。autocomplete の選択とリセットの処理を追跡し、選択されたオプションが `mat-selected` クラスを保持する理由を特定します。入力が空のときにクラスが削除され、報告された手順がテストでカバーされれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100