Hi
My Autocomplete has an array of users. Which has First Name, Last Name. when user tries to search like following
John --> Finds the result
Doe --> Finds the result
John, --> Result not found even though user name is John, Doe
How to make sure auto complete will respect the comma while doing search. Following is my settings for Autocomplete
|
|
If you change your code to following. it will stop working
|
<ejs-autocomplete id='games' #sample [dataSource]='data' [(value)]='value'
[placeholder]='waterMark' [autofill]='true' [suggestionCount]=999 (filtering)="filteringHandler($event)" [ignoreCase]='true' [filterType]='Contains' [fields]='fields'></ejs-autocomplete>
|
|
public filteringHandler(e)
{
let query: Query = new Query();
//frame the query based on search string with filter type.
query = (e.text !== '') ? query.where('Name', 'contains', e.text, true) : query;
//pass the filter data source, filter query to updateData method.
e.updateData(this.data, query);
} |
You are correct for me both field has same value. Once I just removed value field from "fields" it was working as expected, hope this is also a right approach.