1
I’m calling this way in html
<div class="ui-g-12 ui-md-4 center-zone">
<input-radio id="controle" theme="boolean" label="tem controle?" (click)="valueSelect($event)"></input-radio>
</div>
<div class="ui-g-12 ui-md-4">
<msp-input-text id="tipo" [disabled]="true" label=" Qual o tipo de controle? "tooltip="ajustar"></msp-input-text>
</div>
The themes of the Boolean radio field are: YES, NO, INDIFFERENT
I added in formGroup this way
controle: [null],
tipo: [{ value: null, disabled: true }, [Validators.required, Validators.maxLength(30)]],
and mounted this function when selecting the radio value
valueSelect(event: any) {
console.log(event)
if (event.value) {
this.form.controls['chassi'].enable();
} else {
this.form.controls['chassi'].disable();
}
}
When running, it opens disabled (ok, correct), by clicking on yes he needs to enable and case not it disables, but I can’t do it, can you help me please?