Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Commit dfe33ac

Browse files
authored
fix(text-field): Float label if initial value present (#1545)
Closes #1534
1 parent 5f247cc commit dfe33ac

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/textfield/text-field.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {
2-
AfterContentInit,
2+
AfterViewInit,
33
ChangeDetectionStrategy,
44
ChangeDetectorRef,
55
Component,
@@ -93,7 +93,7 @@ let nextUniqueId = 0;
9393
encapsulation: ViewEncapsulation.None,
9494
changeDetection: ChangeDetectionStrategy.OnPush
9595
})
96-
export class MdcTextField implements AfterContentInit, OnDestroy, ControlValueAccessor {
96+
export class MdcTextField implements AfterViewInit, OnDestroy, ControlValueAccessor {
9797
private _uid = `mdc-input-${nextUniqueId++}`;
9898
private _initialized: boolean = false;
9999

@@ -336,7 +336,7 @@ export class MdcTextField implements AfterContentInit, OnDestroy, ControlValueAc
336336
}
337337
}
338338

339-
ngAfterContentInit(): void {
339+
ngAfterViewInit(): void {
340340
this.init();
341341
}
342342

0 commit comments

Comments
 (0)