From c580f86bc1c8950299091f17265c0be1e280d14e Mon Sep 17 00:00:00 2001 From: Albert Gasset Date: Mon, 11 Jun 2018 15:05:35 +0200 Subject: [PATCH] MOBILE-2354 core: Fixed initial textarea resize in auto-rows directive --- src/directives/auto-rows.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/directives/auto-rows.ts b/src/directives/auto-rows.ts index 3e7a24291..3160c00f1 100644 --- a/src/directives/auto-rows.ts +++ b/src/directives/auto-rows.ts @@ -47,8 +47,11 @@ export class CoreAutoRowsDirective { /** * Resize after content. */ - ngAfterViewContent(): void { - this.resize(); + ngAfterViewInit(): void { + // Wait for rendering of child views. + setTimeout(() => { + this.resize(); + }, 300); } /**