bug(Autocomplete): matAutocomplete with control initial value does not highlight value in options with check icon
- 主要言語
- 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
_No response_
### Description
A MatAutocomplete field initialized with a control value does not highlight item in options
### Reproduction
StackBlitz link: https://stackblitz.com/edit/saqfud?file=src%2Fexample%2Fautocomplete-filter-example.ts,src%2Fexample%2Fautocomplete-filter-example.html,src%2Fexample%2Fautocomplete-filter-example.css
Steps to reproduce:
1. Set initial value of control (second one value for example)
```
options: string[] = ['One', 'Two', 'Three'];
myControl = new FormControl(this.options[1]);
```
3. click on input on UI
### Expected Behavior
Second one option is highlighted

### Actual Behavior
second option is not highlighted

### Environment
- Angular:
- CDK/Material:
- Browser(s):
- Operating System (e.g. Windows, macOS, Ubuntu):
コントリビューションガイド
調査の方向性
まず、リンクされた StackBlitz の再現手順を実行し、src/example/autocomplete-filter-example.ts と src/example/autocomplete-filter-example.html を確認します。初期選択された値は存在するものの、入力欄を開いたときにそのオプションがハイライトされないことを確認します。提供された初期 FormControl 値に対して 2 番目のオプションが一貫してハイライトされ、この動作をカバーする回帰テストがあれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100