In my Angular application, I have the following template:
<dxi-column dataField="ordre"
caption="Ordre"
[width]="70"
dataType="number"
[allowEditing]="true">
<dxi-validation-rule type="async"
[validationCallback]="myFunction"
message="">
</dxi-validation-rule>
</dxi-column>
The myFunction function is defined as:
myFunction=(params) => {
console.log(this.myClassVariable)
return Of(!this.myClassVariable.includes(params.value)).toPromise()
}
I want to change the way "myFunction" is declared to:
myFunction() {
//SAME TREATMENT
}
I also attempted to update the function like this:
myFunction() {
console.log(this.myClassVariable) // THROW UNDEFINED
return Of(!this.myClassVariable.includes(params.value)).toPromise()
}
However, I encountered an issue with the class variable being undefined.
Any suggestions on how to solve this?