diff --git a/ej2-javascript/code-snippet/multiselect/basic-cs1/index.ts b/ej2-javascript/code-snippet/multiselect/basic-cs1/index.ts index 0bf447f26..86357b3e8 100644 --- a/ej2-javascript/code-snippet/multiselect/basic-cs1/index.ts +++ b/ej2-javascript/code-snippet/multiselect/basic-cs1/index.ts @@ -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); @@ -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