javascript - Kendo UI autocomplete databound event does not trigger -
i developing mobile application using kendo ui. in script file,
$("#name").kendoautocomplete({ databound: onchange });
suppose autocomplete box has string "abc". when delete letter triggers databound event. delete last letter of autocomplete (emptying autocomplete) not trigger databound event. can explain problem?
when type, auto-complete widget filter data source if there text in it; triggers data source change event in turn leads databound
event being triggered in autocomplete.refresh
method (where widget updates view if necessary).
if there no text in input, data source not filtered , result, databound
event isn't triggered (in case, auto-complete closes popup).
if bothers , want databound
triggered when clear input, can customize widget's search method:
kendo.ui.autocomplete.fn.search = (function (search) { return function (word) { word = word || this._accessor(); var length = word.length; if (!length) { this.datasource.filter({}); // clear data source filter } search.apply(this, arguments); }; })(kendo.ui.autocomplete.fn.search);
(demo)
Comments
Post a Comment