Description
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