angular / angular/components

bug(mat-form-field): mat-form-field appearance outline with mat-icon as matPrefix inside a mat-tab

Đang mở
#26,271 2 bình luận 8 reaction 0 người được giao Xem trên GitHub
area: material/form-field P3
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?

- [X] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

13

### Description

If we have a `` containing a `` inside a `` that is not displayed initially, the label isn't positioned correctly.

### Reproduction

Steps to reproduce:

https://stackblitz.com/edit/angular-ivy-svduwe?file=src%2Fapp%2Fapp.component.html,angular.json,src%2Fstyles.scss,src%2Fapp%2Fapp.module.ts,src%2Findex.html

```




search
Outline form field







search
Outline form field



```

### Expected Behavior

The text should be aligned correctly after the icon

### Actual Behavior

![image](https://user-images.githubusercontent.com/25467653/207881998-8d73d9a7-147c-46b6-95cc-99fd76acd432.png)

### Environment

- Angular: 15.0.4
- CDK/Material: 15.0.3
- Browser(s): Chrome/Firefox
- Operating System (e.g. Windows, macOS, Ubuntu): Windows. MacOS

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 bản tái hiện StackBlitz được liên kết, đặc biệt là src/app/app.component.html và các tệp được tham chiếu angular.json, src/styles.scss, src/app/app.module.ts và src/index.html. Tái hiện outline mat-form-field với một mat-icon matPrefix trong mat-tab ban đầu bị ẩn, sau đó theo dõi hành vi của Angular Material đối với form-field và tab; hoàn tất khi nhãn và văn bản được căn chỉnh chính xác sau khi chuyển tab.

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
38/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.