Hi all,
i’m trying to get a jqxInput with autocomplete work, but i’m experiencing some problem (i’m new in Angular development world).
This is the code in my componente html
<jqxInput #jqxInputDiba
[theme]="'material'"
[source]= "dataAdapterForDiba"
[displayMember]= "'BOMItemCode'"
[valueMember]= "'BOMItemCode'"
[placeHolder] = '"Codice Diba"'
[width]= "'75%'"
[height]= "50"
[popupZIndex]="99999"
(onSelect)= "onselectDiba($event)"
>
</jqxInput>
And this is my typescript code to handle the onSelect Event
onselectDiba(event: any): void {
if (event.args) {
let item = event.args.item;
if (item) {
this.CreateDibaItem = false;
this.DibaNameControl.disable();
}
}
else {
this.CreateDibaItem = true;
this.DibaNameControl.enable();
}
}
The problem is that i don’t really understand when the onSelect event fires and when it fires event.args
is always undefined.
I need to check if the input value is one of the value in the datasource bind to the jqxInput or not. What’s wrong in this code?
Thanks in advance.