I am using Kendo UI 2016 Q1. In this version there I noticed a strange behavior when I want to clear items selected on MultiSelect. I clear them like this:
var multi = $("#test").data("kendoMultiSelect");
multi.value([]);
console.log(multi.value(), multi.dataItems());
In result on console I can see that although value is empty data items are not. This inconsistency causes problem in application. Is this a bug in kendo or expected behavior? Is there a way to ensure that dataItems get cleared immediately when I set value to empty array? Thanks in advance for all suggestions.
Edit I found a simple workaround for clearing problem - after setting the value to empty array I do
multi.refresh();
Then the function dataItems() returns no results, as it should.