Logan Wlv
Logan Wlv

Reputation: 3744

Angular4 mat-form-field textArea can not enable horizontal resize

I am trying to use mat-form-field component with a textarea , I would like to be able to resize on x and y. But adding resize: both; did not make it work, what is the solution for that?

Code:

<mat-form-field style="resize: both;">
    <textarea matInput placeholder="Leave a comment"></textarea>
</mat-form-field>

Upvotes: 2

Views: 1277

Answers (1)

Marshal
Marshal

Reputation: 11091

Applying it to the textarea will allow you to resize on x and y within the mat-form-field...

<textarea style="resize:both" matInput placeholder="Leave a comment"></textarea>

This unfortunately only allows the textarea to resize within the form-field

  • With all of the nested div elements that make up the mat-form-field wrapper, attempting to apply this to all of them will likely end up with nested drag corners and not one seamless resize-able element.

enter image description here

Upvotes: 1

Related Questions