This is a migrated thread and some comments may be shown as answers.

Multiselect configuration with filter and noDataTemplate throws error

1 Answer 143 Views
MultiSelect
This is a migrated thread and some comments may be shown as answers.
Jeremy
Top achievements
Rank 1
Jeremy asked on 28 Jun 2017, 07:57 PM

Using this example https://demos.telerik.com/kendo-ui/dropdownlist/addnewitem and changing the kendoDropDownList to kendoMultiSelect, i receive the error below because the instance.filterInput is not defined on the widget instance. According to your docs these two property configurations are supported. How can I get the multiSelect to have a filter?

DOCS

http://docs.telerik.com/kendo-ui/api/javascript/ui/multiselect#configuration-filter

http://docs.telerik.com/kendo-ui/api/javascript/ui/multiselect#configuration-noDataTemplate

 

ERROR

Uncaught TypeError: Cannot read property 'val' of undefined
    at init.eval [as noDataTemplate] (eval at compile (kendo.all.js:194), <anonymous>:3:196)
    at init._renderNoData (kendo.all.js:27300)
    at init._listBound (kendo.all.js:33923)
    at init.d (jquery.min.js:2)
    at init.trigger (kendo.all.js:124)
    at init.refresh (kendo.all.js:28807)
    at init.d (jquery.min.js:2)
    at init.trigger (kendo.all.js:124)
    at init._process (kendo.all.js:6965)
    at init.success (kendo.all.js:6710)

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 29 Jun 2017, 11:33 AM
Hello Jeremy,

I replied in the support ticket you opened with the same subject. To summarize here as well, the MultiSelect and DropDownList have their own Add new item demos (MultiSelect demo, DropDownList demo), in which widget-specific logic and methods are used to achieve the same result, for example:
​In the MultiSelect demo:
widget.value(widget.value().concat([newValue]));
and in the DropDownList demo:
widget.select(dataSource.view().length - 1);
Thus instead of replacing the widgets in one demo we would suggest reviewing the widget-specific logic in each of the dropdown widgets' (DropDownList, MultiSelect, ComboBox, AutoComplete) Add new item demos. 

Regards,
Ivan Danchev
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
MultiSelect
Asked by
Jeremy
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question
or