bug(Autocomplete): Selected option is not deselected when first input is removed while panel is closed (without clicking on input field for focus)
- 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
Selected option does not get deselected when the input is cleared (without clicking on input field for focus) while the panel is closed.
https://github.com/user-attachments/assets/3930b00b-7131-4b98-b29b-597b8883eb94
### Reproduction
StackBlitz link:
Steps to reproduce:
1. Click on autocomplete input field.
2. Select an option from the list.
3. Hit backspace from keyboard. (NOTE - don't click on the input to focus the field so that the panel remains closed while hitting backspace)
4. On first backspace - the selection (checkmark) remains on the previously selected option and the panel gets opened.
5. On second backspace - the selection gets cleared because panel was already open.
### Expected Behavior
The selection should get cleared since the input value has changed.
### Actual Behavior
The selection does not get cleared.
### Environment
- Angular:
- CDK/Material:
- Browser(s):
- Operating System (e.g. Windows, macOS, Ubuntu):
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện chuỗi autocomplete Angular được mô tả: chọn một tùy chọn, giữ panel đóng và nhấn Backspace mà không lấy lại tiêu điểm cho input. Theo dõi cách thay đổi input đầu tiên xử lý tùy chọn đã chọn và trạng thái của panel. Được xem là hoàn tất khi lựa chọn được xóa ngay lần nhấn Backspace đầu tiên trong lúc panel đang đóng; issue không nêu file hoặc test nào.
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
- 45/100