Does anyone know of an equivalent to the Aura utility methods for adding/ removing style classes dynamically, or have some other workaround?
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/js_cb_styles.htm
Does anyone know of an equivalent to the Aura utility methods for adding/ removing style classes dynamically, or have some other workaround?
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/js_cb_styles.htm
Best Answer
You can use the standard element classList property for it (see here)
Like:
Template
Controller:
Example: https://developer.salesforce.com/docs/component-library/tools/playground/b-iFXjvxr/1/edit