-1
I’m using the DevExpress
, when I do direct by HTML
works, but with the dxi-item
no, probably because I’m using onValueChanged
incorrectly...
FORM 1
Component.html
<dxi-item
dataField="cep"
autocomplete="off"
[colSpan]="2"
[label]="{text: 'CEP'}"
[editorOptions]="{onValueChanged: cepChanged}">
</dxi-item>
Component.
ConsultaCEP(cep) {
console.log("Consultar CEP: " + cep);
}
cepChanged(e){
this.ConsultaCEP(e.value);
}
Does not log in
Error
ERROR Typeerror: this.Consultacep is not a Function
FORM 2
Component.html
<dxi-item
dataField="cep"
autocomplete="off"
[colSpan]="2"
[label]="{text: 'CEP'}"
[editorOptions]="{onValueChanged: ConsultaCEP}">
</dxi-item>
Component.
ConsultaCEP(e) {
console.log("Consultar CEP: " + e.value);
this.service.consultaCEP(e.value)
....
}
LOG RESULT
Consultation CEP: 0123456
Error
ERROR Typeerror: Cannot read Property 'consultaCEP' of Undefined
I repeat, in both ways, making HTML work.
It’s been two days since I texted their support and got no response...
pq your method starts with uppercase letter?
– Eduardo Vargas
It wasn’t me who did it, I’m only responsible for maintenance and it’s really relevant? They are good practices, okay, but right...
– LeoHenrique