Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/cdk/text-field/autosize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ export class CdkTextareaAutosize implements AfterViewInit, DoCheck, OnDestroy {
ngAfterViewInit() {
if (this._platform.isBrowser) {
// Remember the height which we started with in case autosizing is disabled
this._initialHeight = this._textareaElement.style.height;
// TODO: as any works around `height` being nullable in TS3.6, but non-null in 3.7.
// Remove once on TS3.7.
this._initialHeight = this._textareaElement.style.height as any;

this.resizeToFitContent();

Expand Down Expand Up @@ -247,7 +249,8 @@ export class CdkTextareaAutosize implements AfterViewInit, DoCheck, OnDestroy {
if (this._initialHeight === undefined) {
return;
}
this._textareaElement.style.height = this._initialHeight;
// TODO: "as any" inserted for migration to TS3.7.
this._textareaElement.style.height = this._initialHeight as any;
}

// In Ivy the `host` metadata will be merged, whereas in ViewEngine it is overridden. In order
Expand Down