Hi,
i’m trying to change the value of the query parameter of the datasource function. The input value is different of the values of the value of datasource.
ei: My datasource: {label:’4000-name’, value:’4000′} and the input is ‘4.0’.
Inside the datasource function i transform the ‘4.0’ to ‘4000’. The result of the autocomplete list in the function is correct but in the view says ‘no items values found’.
i attach the function
<smart-text-box #ctactbbanco form-control-name="ctactbbanco" name="ctactbbanco" id="ctactbbanco" [autoComplete]="'inline'" [displayMember]="'label'"
[valueMember]="'value'" [inputMember]="'value'" [minLength]="1" [dropDownPlaceholder]="'No hay cuentas contables.'"></smart-text-box>
this.inputCtactbbanco.dataSource = (query: string, callback: Function): void => {
let result: Array<object> = [];
if (query.includes('.')){
query = Utils.puntoToNumeroCuenta(query); // 4.0 transform to 4000
}
for (let d = 0; d < autocomplete.length; d++) {
if (autocomplete[d].label.toLowerCase().indexOf(query.toLowerCase()) > -1) {
result.push(autocomplete[d]);
}
}
// result has the correct list with the elements with 4000 in their values, but in the view arent showing them
callback(result);
};
Thanks in advance