Strange "pseudo caching" or repetition in MutliSelect

Stacey

I am using a Kendo MultiSelect for a "Tag Cloud" type thing. Tags look like this ... they are simple JSON.

{

Id: "tags/weapon",

Name: "Weapon",

Description: "This item qualifies as a weapon in the game."

},

{

Id: "tags/sword",

Name: "Sword",

Description: "This item qualifies as a sword in the game."

},

{

Id: "tags/shield",

Name: "Shield",

Description: "This item qualifies as a shield in the game."

}

The view model looks a lot like this ...

varviewModel = kendo.observable({

Id: null,

Name: null,

Consumable: false,

Equipable: false,

Tags: [],

});

The javascript to create the multi-select looks like this ...

var$tags = $("#tags").kendoMultiSelect({

dataTextField: "Name",

dataValueField: "Id",

itemTemplate: $('#editing-tags-template').html(),

dataSource: {

transport: {

read: {

dataType: "json",

url: url

}

}

},

open: function(e) {

this.list.addClass("k-tag-cloud");

},

close: function(e) {

}

}).data("kendoMultiSelect");

Where k-tag-cloud is a custom CSS style, this isn't giving me any trouble.

The HTML that this applies to is like this...

<select id="tags"multiple="multiple"

data-placeholder="Select Tags..."

class="dark k-tag-cloud"

data-bind="value: Tags"

style="width: 500px;"></select>

All of this works exactly as I expect. It appears like this on my screen, the behavior is normal, etc; I can select multiple tags, and when I save the item, they get saved without any extra code - just by being bound to the view model. If I retrieve an item, the tags list gets re-populated correctly with the selected tags.

However there is a template that is being used to draw the list to the screen in a different part of the page, that looks like this ..

Daniel

Thank you for bringing our attention to this problem. I reproduced it on my side and we will look into it. A possible workaround for now is to trigger the change event for the Tags field when the multiselect value is changed:

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.