You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Input group keeps the host classes of its first theme after a runtime theme change #17991
When the theme is changed at runtime through THEME_TOKEN, an igx-input-group inside an OnPush component (for example igx-combo) updates its template but keeps the host classes of the theme it was first rendered in. With a Material stylesheet and Bootstrap host classes, a type="border" input loses its outline, and its value runs under the suffix icons.
The token subscription in input-group.component.ts calls only this.cdr.detectChanges(). That refreshes the component's own view, but host bindings belong to the parent's view, and an OnPush parent such as igx-combo is not marked dirty, so they are not refreshed. A later change detection of the parent, such as ng.applyChanges on the combo, corrects the classes.
Framework
Angular
Angular Version
22.3.0
Ignite UI for Angular Version
igniteui-angular 22.3.0-alpha.0. master has the same code
Component / Area
Input Group
Browser
Chrome
Operating System
Windows
Command Not Working
Steps to Reproduce
Use the default THEME_TOKEN (no explicit token value, so preferToken is false). Load the Bootstrap stylesheet and set the token to bootstrap.
Render an igx-combo with type="border".
Load the Material stylesheet and call themeToken.set('material').
Actual Result
The input group's template switches to Material: the notch is rendered. Its host classes still read igx-input-group--bootstrap, and igx-input-group--border is missing.
Expected Result
The host classes follow the new theme: igx-input-group--border, and no igx-input-group--bootstrap.
Reproduction URL
(waiting for new combo samples so I can link it directly)
Activity