DEV Community

Discussion on: How to disable active and inactive button based on the status?

Collapse
 
jaredcomiso profile image
jaredcomiso

you have to bind the button property

Example:

Then in your ts create a variable isDisabled with type boolean so it can either be true or false.
Then include an onChanges hooks(like onInit).
Then inside the hook function you can do the cases
example:

if(status === 'pending') {
this.isDisabled = true;
}