angular / angular/components

bug(mat-autocomplete): missing selection indicator (highlight + check icon) when using mat-autocomplete with mat-optgroup

Đang mở
#29,189 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Accessibility area: material/autocomplete P4
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

14

### Description

v15 introduced an indicator of the currently selected item:
![image](https://github.com/angular/components/assets/32791888/3f1e8ce5-5d32-4503-afdf-1c0d859f7360)
However, this indicator is missing when, instead of flat mat-options, we're using mat-optgroup with mat-options:
![image](https://github.com/angular/components/assets/32791888/0049610c-767c-4ffe-9b18-d0ad7446a56f)

### Reproduction

The repro is even in the official documentation of any version higher than v14:
https://v15.material.angular.io/components/autocomplete/examples

### Expected Behavior

We should see the indicator of a selected item even when we're using mat-optgroup

### Actual Behavior

Missing selection indicator when using mat-autocomplete with mat-optgroup

### Environment

- Angular: v15+
- CDK/Material: v15+

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với các ví dụ về Autocomplete được liên kết trong issue và so sánh trường hợp mat-options phẳng với trường hợp mat-optgroup. Tái hiện phần tô sáng và biểu tượng dấu kiểm bị thiếu trên Angular/Material v15+, sau đó xác minh rằng chỉ báo mục đã chọn cũng xuất hiện đối với các tùy chọn được nhóm.

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
Đặc tả rõ ràng
Mức phù hợp với người mới
42/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.