[![enter image description here][1]][1]I am trying to set a maximum height for a text area so that when the user keeps adding text, it will display a scroll bar once it reaches the limit. Currently, my implementation causes the modal to stretch too much when more text is added.
Is there a way to prevent the modal from stretching in this case? Thank you.
html
<div fxLayout="row" fxLayoutAlign="start start" class="full-width question-text" fxLayoutGap="12px">
<mat-form-field style="height: auto; overflow: hidden;" class="pr-4" appearance="outline">
<mat-label>Comments</mat-label>
<div
style="
margin-right: 10px;
overflow-y: auto;
height: auto;
max-height: 200px;
"
>
<textarea cdkTextareaAutosize
matTextareaAutosize
matInput
formControlName="comment"
[required]="isCommentRequired()"
></textarea>
</div>