|
public onFiltering: EmitType<FilteringEventArgs> = (e: FilteringEventArgs) => {
let predicate = new Predicate('country', 'startswith', e.text, true);
predicate = predicate.or('code', 'contains', e.text,true);
let query: Query = new Query();
//frame the query based on search string with filter type.
query = (e.text !== '' ) ? query.where(predicate) : query;
//pass the filter data source, filter query to updateData method.
e.updateData(this.countryCodes, query);
}
|