Skip to content

Commit

Permalink
fix: refresh view after content is initialized
Browse files Browse the repository at this point in the history
Signed-off-by: Akshat Patel <[email protected]>
  • Loading branch information
Akshat55 committed Nov 21, 2024
1 parent 8494242 commit 9885e4b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/input/text-input-label.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
AfterContentInit,
AfterViewInit,
ChangeDetectorRef,
Component,
Expand Down Expand Up @@ -102,7 +103,7 @@ import {
</div>
`
})
export class TextInputLabelComponent implements AfterViewInit {
export class TextInputLabelComponent implements AfterViewInit, AfterContentInit {
/**
* Used to build the id of the input item associated with the `Label`.
*/
Expand Down Expand Up @@ -210,6 +211,10 @@ export class TextInputLabelComponent implements AfterViewInit {
}
}

ngAfterContentInit() {
this.changeDetectorRef.detectChanges();
}

public isTemplate(value) {
return value instanceof TemplateRef;
}
Expand Down

0 comments on commit 9885e4b

Please sign in to comment.