bug(Chips): Selecting value from autocomplete by keyboard navigation causes both the search string and the selected option to be added
- 主要言語
- 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
Reproducible on this [example](https://material.angular.io/components/chips/overview#chips-autocomplete).
### Reproduction
StackBlitz link: https://stackblitz.com/edit/rd9usi?file=package.json
Steps to reproduce:
1. Type any input that is a substring of any item in the suggestion list
2. Navigate to a suggestion with keyboard
3. Press Enter
4. Both the search string and the selected are added
### Expected Behavior
Only the selected suggestion is added
### Actual Behavior
Both the selected and the suggested values are added
### Environment
- Angular: 16.2.6
- CDK/Material: 16.2.8
- Browser(s): Google Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): darwin arm64
コントリビューションガイド
調査の方向性
package.jsonを含む、リンク先のStackBlitzの再現から始め、その動作をChips autocompleteの例と比較します。入力した部分文字列に対するキーボードナビゲーションとEnterの処理を追跡し、その後、選択した候補だけが追加され、検索文字列が同時に追加されないことを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100