angular / angular/components

form-field(select): with matNativeControl and outline where one field relies upon the value of another

Đang mở
#16,229 1 bình luận 3 reaction 0 người được giao Xem trên GitHub
area: material/form-field area: material/select 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ả

#### Reproduction

Open StackBlitz, and try to select different options, open dev tools and see errors: https://angular-jjb9g7.stackblitz.io

Steps to reproduce:
1. Add two `mat-form-field` with `appearance="outline"`
2. Add `` to each one
3. Make that second field select dynamically get options after first field value changed


#### Expected Behavior

First field changes value and second field get new options

#### Actual Behavior
First field changes value and second field get new options and errors at console are shown:
```ts
ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked.
Previous value: 'mat-form-field-should-float: false'.
Current value: 'mat-form-field-should-float: true'.
```

#### P.S. If delete appearance="outline", no errors are shown.

#### Environment

- Angular: 7.2.0
- Material: 7.3.7 and 8.2.3
- Browser(Chrome Version 74.0.3729.108 (Official Build) (64-bit)):
- Operating System (Ubuntu 18.04):

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 và kiểm tra hai phần tử mat-form-field có viền đang sử dụng matNativeControl. Tái hiện việc cập nhật select phụ thuộc trong khi theo dõi console để tìm ExpressionChangedAfterItHasBeenCheckedError. Được xem là hoàn thành khi trường thứ hai cập nhật sau khi trường thứ nhất thay đổi mà không có lỗi được báo cáo, đồng thời vẫn giữ giao diện outline.

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

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.