http://jsfiddle.net/ruchan/AgV52/1/
Problem replication:
-click "Init List" and then add new tag to the box by keyboard.
-now click fill List button [it fills "1,2,3" as selected values].
- All the values are not being selected. or sometimes only last value is selected
note: The problem in only when you do the tag selections from keyboard. Doing it by mouse clicks shows no problem
Is this a bug or i am doing something wrong?
Problem replication:
-click "Init List" and then add new tag to the box by keyboard.
-now click fill List button [it fills "1,2,3" as selected values].
- All the values are not being selected. or sometimes only last value is selected
var list=[{label:'tag1', value:'1'},
{label:'tag9', value:'9'},
{label:'tag8', value:'8'},
{label:'tag7', value:'7'},
{label:'tag6', value:'6'},
{label:'tag5', value:'5'},
{label:'tag4', value:'4'},
{label:'tag3', value:'3'},
{label:'tag2', value:'2'}];
function fillData(tagIds){
var tagObj = $("#addTags").data("kendoMultiSelect");
if (tagObj == undefined) { // if not loaded
$("#addTags").kendoMultiSelect({
dataTextField: "label",
dataValueField: "value",
dataSource: list,
value: tagIds, placeholder: "Select from list",
change: function() {
// change
}
});
} else { // if already loaded only change the values.
tagObj.value(tagIds);
console.log(tagIds);
console.log(tagObj.value());
}
}
function fillaList(){
var tagIds=[1,2,3];
fillData(tagIds);
}
function clearList(){
fillData([]);
}
note: The problem in only when you do the tag selections from keyboard. Doing it by mouse clicks shows no problem
Is this a bug or i am doing something wrong?