Hello, when the ion-textarea is first displayed with text using ngModel, the autoGrow directive does not work as the height of the textarea (within ion-textarea) is initially set to 0px. As soon as I edit the text, the height is set automatically and works. Here’s my code:
<ion-textarea [(ngModel)]="note" placeholder="Write a note here..." autoGrow="true" autoFocus="true" maxlength="400"></ion-textarea>
Is there a way to get autogrow working with ngmodel when it first displays? Thanks
You will see, that the styles are applied after changing the value, so the easiest way would be to programatically fire a change (ionChange) event for the input.
Another (hacky) way would be to take the code, which is responsible for the autoGrow feature and apply it by yourself: