Hello,
I have a form in component. One of controls is checkbox. I'm setting initially its state to disabled, but it's not working, it's always enabled.
<kendo-formfield [orientation]="'horizontal'">
<kendo-label [for]="searchWithoutRouteCheckbox" text="wyszukaj bez trasy"></kendo-label>
<input type="checkbox" #searchWithoutRouteCheckbox class="search-without-route-type"
[formControlName]="formNames.searchWithoutRoute" [value]="formModel.searchWithoutRoute" kendoCheckBox
[disabled]="areControlsDisabled" />
<app-form-error [controlName]="formNames.searchWithoutRoute" [form]="form"></app-form-error>
</kendo-formfield>
/**
* If form controls should be disabled
* @type {boolean}
* @public
*/
public areControlsDisabled: boolean = true;
/**
* Fired when railway objects combobox value is changed
* @param {RailwayObject} value railway object item
* @public
*/
public railwayObjectsValueChange(value: RailwayObject): void {
if (value) {
this.areControlsDisabled = false;
this.isSearchButtonDisabled = false;
this.isClearButtonDisabled = true;
return;
}
this.areControlsDisabled = true;
this.isSearchButtonDisabled = true;
this.isClearButtonDisabled = true;
}