bug(Chips): Selecting value from autocomplete by keyboard navigation causes both the search string and the selected option to be added
- Ngôn ngữ chính
- TypeScript
- Star
- 25k
- Fork
- 6.8k
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 91
Mô tả
### 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
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với bản tái hiện StackBlitz được liên kết, bao gồm package.json, và so sánh hành vi của nó với ví dụ tự động hoàn thành Chips. Theo dõi thao tác điều hướng bằng bàn phím và việc xử lý Enter đối với một chuỗi con được nhập, sau đó xác minh rằng chỉ gợi ý được chọn mới được thêm vào và chuỗi tìm kiếm không được thêm vào cùng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- angular, typescript
- Lĩnh vực
- frontend
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 42/100