This is a migrated thread and some comments may be shown as answers.

MVVM 2012.2.710 Binding Issue

0 Answers 29 Views
MVVM
This is a migrated thread and some comments may be shown as answers.
Glenn
Top achievements
Rank 1
Glenn asked on 25 Jul 2012, 03:25 PM
Hi,

I believe I have stumbled across an issue with the most recent release of the Kendo Web UI JavaScript library in the MVVM bindings.

It seems that when you define a binding snippet of HTML using the data-template and nest a second data-template the parent template is incorrectly re-rendered when the child collection is changed.

I have created two JSFiddle projects that demonstrate the issue in 2012.2.710 and the the code working correctly in 2012.1.322.

The data set that I am working with in my project can contain 1 to many image sets (collections of images AKA a layer) and each image set can have 0 to many images.

When I attempt to add a new image to the image set's images array the MVVM bindings refresh for the image set and render a second time using the selected image record as a new "image set" resulting in the entire snippet being repeated on the page.

This behavior did not exist in 2012.1.322.

The expected behavior of the code I have provided is that when you click add image the new image will be appended to the images already displayed.

My sample project:

Using Kendo 2012.1.322 (working correctly)

Using Kendo 2012.2.710 (incorrectly rendering the parent data-template)

No answers yet. Maybe you can help?

Tags
MVVM
Asked by
Glenn
Top achievements
Rank 1
Share this question
or