angular / angular/components

Extending CdkTextareaAutosize features. heightChanges / setHeight

Open
#19,656 6 comments 0 reactions 0 assignees View on GitHub
area: cdk/text-field feature P4
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

## Proposal

Add for [MatTextareaAutosize](https://material.angular.io/components/input/api#MatTextareaAutosize) Callback with height and return custom sum and set it as height for textarea element.

```
CdkTextareaAutosize {
...
// Options by default parameter emitEvent is false
setHeight(height: number, {emitEvent: boolean}): void;

// Return number after calculation height textarea element
heightChanges(): Observable;
...
}
```

Contributor guide

Open the contributing guide

Research direction

Start by reading the existing MatTextareaAutosize/CdkTextareaAutosize API and implementation, using the linked Angular Material API reference as context. Determine how the proposed setHeight and heightChanges behavior should fit the current component, and consider the proposal complete when both methods have clearly defined, working behavior for textarea height updates and event emission.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.