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
I need to change the theme in runtime using TaaS, but Inputs groups fail to update.
After changing my theme from Fluent to Material the labels still look as in fluent:
Related to this there's a problem. Even if I'm not switching themes, if the stylesheet hasn't loaded by the time the Input Group was rendered then it will default to material even after it finishes loading.
Solution
I don't have a clear solution to this. Input Groups could observe some global theme property that I can update using a service.
I think this was @damyanpetev suggestion.
Alternatives
I could destroy the view and force it to render from scratch so it infers the new theme.
This could be easily achieved with a fake *ngFor on an array with a single theme property.
The text was updated successfully, but these errors were encountered:
We could have a mutation observer that forces re-render of the input group instance whenever the theme changes. I even discussed this limitation with the team before merging the changes done to the input group and how the theming works there. We, however, decided that this is an edge case, and we shouldn't pay too much attention to it.
Problem
I need to change the theme in runtime using TaaS, but Inputs groups fail to update.
After changing my theme from Fluent to Material the labels still look as in fluent:
Related to this there's a problem. Even if I'm not switching themes, if the stylesheet hasn't loaded by the time the Input Group was rendered then it will default to material even after it finishes loading.
Solution
I don't have a clear solution to this. Input Groups could observe some global theme property that I can update using a service.
I think this was @damyanpetev suggestion.
Alternatives
I could destroy the view and force it to render from scratch so it infers the new theme.
This could be easily achieved with a fake *ngFor on an array with a single theme property.
The text was updated successfully, but these errors were encountered: