bug(Form field): mat-error adds spaces to beginning and end when on several lines
- 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
v14
### Description
When I use mat-error like this:
``
` My Error Message`
``
the resulting string for "My Error Message" has spaces at the beginning and end of it: " My Error Message ".
When I do this:
`My Error Message`
the resulting string is displayed correctly.
### Reproduction
Steps to reproduce:
1. create a mat-error with a line-break and input some dummy text
### Expected Behavior
There shouldn't be spaces inside the mat-error message when it is multi-line.
### Actual Behavior
There are spaces inside the mat-error message when it is multi-line.
### Environment
- CDK/Material: 15.0.4
- Browser(s): Firefox/Chrome
- Operating System Windows
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện ví dụ mat-error nhiều dòng trong Angular Material và theo dõi cách nội dung thông báo được render. Hoàn thành khi văn bản mat-error nhiều dòng không có khoảng trắng ở đầu hoặc cuối, trong khi trường hợp một dòng vẫn được hiển thị chính xác.
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
- 35/100