feathersui-starling icon indicating copy to clipboard operation
feathersui-starling copied to clipboard

FeathersControl: changes to styleNameList should be part of invalidation cycle

Open joshtynjala opened this issue 6 years ago • 2 comments

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.

joshtynjala avatar Sep 18 '17 14:09 joshtynjala

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.

Klug76 avatar Sep 19 '17 10:09 Klug76

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.

joshtynjala avatar Sep 19 '17 13:09 joshtynjala