bug(Text field): cdkAutosizeMinRows and cdkAutosizeMaxRows not working
- 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
14.2.7
### Description
cdkAutosizeMinRows and cdkAutosizeMaxRows are not working properly.
### Reproduction
Steps to reproduce:
1. Go to https://material.angular.io/cdk/text-field/examples
2. In the "Auto-resizing textarea" example, type a few lines
### Expected Behavior
In the example, it should grow to 5 lines. I tested the example on stackblitz and changed the min/max values and the size doesn't respect those.
### Actual Behavior
In the example, after the 3rd one, the textarea stopped growing.
In stackblitz, there didn't seem to be any logic based on the value I was entering. There seems to be a hard stop at 6 lines, and it looks like it is 2 lines off (max of 5 shows 3 lines, max of6 shows 4 lines, ...).
### Environment
- Angular: 15.0.0
- CDK/Material: 15.0.2
- Browser(s): Chrome Version 108.0.5359.98 (Official Build) (64-bit)
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 10
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với các ví dụ CDK text-field tại https://material.angular.io/cdk/text-field/examples và tái hiện vấn đề trong ví dụ “Auto-resizing textarea” bằng các phiên bản Angular 15.0.0 và CDK/Material 15.0.2 được báo cáo. So sánh cdkAutosizeMinRows và cdkAutosizeMaxRows với mức tăng trưởng thực tế của textarea; hoàn thành khi ví dụ tôn trọng cả hai giá trị.
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
- 48/100