From 5f88ff79b9428bcb09a04d01159cfd3f75d79854 Mon Sep 17 00:00:00 2001 From: Simeon Simeonoff Date: Fri, 16 Aug 2024 17:11:46 +0300 Subject: [PATCH] fix(input-group): theme not read from stylesheet --- .../src/lib/input-group/input-group.component.ts | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/projects/igniteui-angular/src/lib/input-group/input-group.component.ts b/projects/igniteui-angular/src/lib/input-group/input-group.component.ts index ef2e138c91c..9f8b5895dee 100644 --- a/projects/igniteui-angular/src/lib/input-group/input-group.component.ts +++ b/projects/igniteui-angular/src/lib/input-group/input-group.component.ts @@ -442,15 +442,11 @@ export class IgxInputGroupComponent implements IgxInputGroupBase, AfterViewCheck /** @hidden @internal */ public ngAfterViewChecked() { - if (!this._theme) { - const theme = this.theme ?? this.themeService.getComponentTheme(this.element); - - if (theme) { - Promise.resolve().then(() => { - this._theme$.next(theme); - this.cdr.markForCheck(); - }); - } + const theme = this.themeService.getComponentTheme(this.element); + + if (theme) { + this._theme$.next(theme); + this.cdr.markForCheck(); } }