-
Notifications
You must be signed in to change notification settings - Fork 156
fix(*): icon service doesn't work with scoped themes #15150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
projects/igniteui-angular/src/lib/checkbox/checkbox.component.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
projects/igniteui-angular/src/lib/checkbox/checkbox.component.ts
Outdated
Show resolved
Hide resolved
public subject: BehaviorSubject<IgxTheme>; | ||
|
||
constructor(private t?: IgxTheme) { | ||
const globalTheme = globalThis.window |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And I think I preferred this more on the root factory level or was this intentional for a sneaky auto-init on a scoped bit of the DOM? I guess that could be useful, just figured the main use would be to always set something anyway which would make the computed styles call redundant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sneaky thing this allows me to do is to initialize a ThemeToken without passing a theme to the constructor in the root factory, making the preferToken getter return false when no theme is passed to the factory.
Closes #15094
Additional information (check all that apply):
Checklist:
feature/README.MD
updates for the feature docsREADME.MD
CHANGELOG.MD
updates for newly added functionalityng update
migrations for the breaking changes (migrations guidelines)