Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70764

Ion-textarea autogrow height lost on rerender

$
0
0

@IvoHuigsloot wrote:

Heey guys,

I am building a app, now i was working chat functionality. I open this chat with a model where i use a ‘ion-textarea’ as input for the message, this all works fine when i first open the model.

Once I close the model and opens it again this happens:
image

I tried to add a min-height but this only applies to the ion-textarea and not the inner textarea,

This only occurs when using the autogrow propperty, is there a way to fix this?

Here is my code for the inputs

    <ion-row class="ion-align-items-center">
        <ion-col size="8">
            <ion-textarea
                autofocus
                autoGrow
                autocapitalize
                rows="1"
                placeholder="Send message"
                [(ngModel)]="message"
                class="ion-no-margin message-input"
            ></ion-textarea>
        </ion-col>
        <ion-col size="2">
            <ion-button
                expand="block"
                fill="clear"
                color="primary"
                (click)="takePicture()"
                class="send-button">
                <ion-icon name="attach"></ion-icon>
            </ion-button>
        </ion-col>
        <ion-col size="2">
            <ion-button
                expand="block"
                fill="clear"
                color="primary"
                (click)="sendMessage()"
                [disabled]="message === ''"
                class="send-button">
                <ion-icon name="send"></ion-icon>
            </ion-button>
        </ion-col>
    </ion-row>

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70764

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>