Buttons and css

Is there a way to replace a previously defined css class on a button? .define(‘css’, ‘newclass’) seems to add ‘newclass’ instead of replacing the old one and .config.css = ‘newclass’ does nothing. I’m calling .refresh() after both implementations.

This is because I have a custom css on my buttons, so the default .disable() doesn’t change the UI of the button, so I have to manually change the css.

You can use common css helpers

var button = $$("button");
webix.html.removeCss(button.$view, "oldclass");
webix.html.addCss(button.$view, "newclass");