angular / components

Component infrastructure and Material Design components for Angular
https://material.angular.io
MIT License
24.39k stars 6.76k forks source link

bug(Text field): cdkAutosizeMinRows and cdkAutosizeMaxRows not working #26233

Open CyrilGC opened 1 year ago

CyrilGC commented 1 year ago

Is this a regression?

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

rojasjandro89 commented 11 months ago

Still an issue one year later. I'm surprised no one else has reported this 🤔 00_0

jannispl commented 8 months ago

Also affected by this issue.

michael-lang commented 3 months ago

Still broken in Angular CDK 17