Skip to content

make matTextareaAutosize bindable #9884

Closed
@shlomiassaf

Description

@shlomiassaf

Bug, feature request, or proposal: proposal

What is the expected behavior?

When using matTextareaAutosize, the auto size feature can be enabled/disabled based on bindings.

What is the current behavior?

matTextareaAutosize is not bindable.

What is the use-case or motivation for changing an existing behavior?

Controlling the auto-size feature can allow smart layouts based on media queries, or any other logic the user implements. It also allows dynamic forms to set it on/off based on schema selection.

Another thing is that the matTextareaAutosize directive is a bit misleading, one might easily think it is a property of matInput.

This should be fairly easy to implement, I think just adding an @Input() matTextareaAutosize: boolean will do the trick, using true as the initial value and coercion when set.

There is one issue with the duplicate selectors (textarea[mat-autosize], textarea[matTextareaAutosize]) which I have no clue how the end result is when someone will do [mat-autosize]="autoSize

Also related #9831

cc @jelbourn @mmalerba

Metadata

Metadata

Assignees

Labels

featureThis issue represents a new feature or feature request rather than a bug or bug fixhelp wantedThe team would appreciate a PR from the community to address this issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions