Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions ej2-javascript/code-snippet/multiselect/basic-cs1/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@



import { MultiSelect, CheckBoxSelection } from '@syncfusion/ej2-dropdowns';
import { MultiSelect, CheckBoxSelection, FilteringEventArgs } from '@syncfusion/ej2-dropdowns';
import { Query } from '@syncfusion/ej2-data';

MultiSelect.Inject(CheckBoxSelection);

Expand Down Expand Up @@ -32,9 +33,9 @@ let msObject: MultiSelect = new MultiSelect({
filtering: function (e: FilteringEventArgs) {
let query = new Query();
//frame the query based on search string with filter type.
query = (e.text != "") ? query.where("country", "startswith", e.text, true) : query;
query = (e.text != "") ? query.where("sports", "startswith", e.text, true) : query;
//pass the filter data source, filter query to updateData method.
e.updateData(searchData, query);
e.updateData(sportsData, query);
}
});
//render the component
Expand Down