feathersui-starling
feathersui-starling copied to clipboard
FeathersControl: changes to styleNameList should be part of invalidation cycle
Multiple changes to styleNameList (such as removing one style name and adding another) should be batched together so that the theme's styles are only applied once.
Please correct me if I am wrong, but in general there is no effective way to undo the changes made to the component by the current style, and therefore changing the style at run-time is useless.
You just need to be careful that you set the exact same properties in both functions. In other words, you may want to manually reset some properties to their defaults. It's a little more work, yes, but not useless.