You can add disabled property to the button config. If the property evaluates to true, the button will be disabled.
disabled