0
votes

I have a Kendo UI ComboBox with serverfiltering set to true and autobind to false. I want it to behave like the following:

1) On page load doesn't load anything.

2) When the user writes some text, server filtering is performed and results are displayed.

3) When the user click dropdown, load all items regardless of filtering and display them.

The issue is that in earlier versions of KendoUI, the combobox worked like the above with the right configuration, but in newer versions, entering some text and clicking on the dropdown does not trigger a read and thus only show items matching the filter.

Reproduce

See the following example: https://dojo.telerik.com/ATEWEmuz

1) Select newest version of the Kendo UI framework at "Choose Library"

2) Click the combobox

3) Write j and wait a bit, then click outside the combobox

4) Click the dropdown arrow

Result in earlier versions vs result in current version:

enter image description here enter image description here

Is there a way to tell kendo to reload all data when I click on dropdown via configuration? I tried binding the ondown event on the arrow to a datasource read command, but that resulted in other weird behavior.

1
Can you check that dojo ? Comes up empty for me. Might be related to login issues regarding the data. Can you post the javascript itself ? - Richard
Can you try this: dojo.telerik.com/ATEWEmuz. There should be no issues with login since i've simulated the data - MortenGR
The ATE... link works, and I can confirm earlier library (2016 R1) acts as first picture and (2018 R1 SP1) as second picture. - Richard

1 Answers

0
votes

If you log the read actions

var ret = ["John", "Candice", "Scott", "Rejer"];
console.log(ret);
console.log(filter);

You will see that older libraries read with no filter during open event. The newest library does not perform a read during open.

This could be related to https://github.com/telerik/kendo-ui-core/issues/3926, or it could be the behavioral contract changed.

To revert to prior behavior you can remove the filters in the combobox blur event handler.

var kendoControl = $("#box").data("kendoComboBox");

$("#box").blur(function(e) {
  kendoControl.dataSource.filter([]);
});