angular / angular/components

bug(Text field): cdkAutosizeMinRows and cdkAutosizeMaxRows not working

Abierto
#26,233 7 comentarios 15 reacciones 0 asignados Ver en GitHub
area: cdk/text-field P3
Lenguaje dominante
TypeScript
Estrellas
25k
Forks
6.8k
Merge medio
1 d 8 h
PR fusionados (30 d)
91

Descripción

### 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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con los ejemplos de CDK text-field en https://material.angular.io/cdk/text-field/examples y reproduce el problema en el ejemplo “Auto-resizing textarea” usando las versiones indicadas Angular 15.0.0 y CDK/Material 15.0.2. Compara cdkAutosizeMinRows y cdkAutosizeMaxRows con el crecimiento real del área de texto; se considera terminado cuando el ejemplo respeta ambos valores.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
angular, typescript
Área
frontend
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
48/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.