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

Problem, Randslider change event triggers BEFORE the viewmodel changes

3 Answers 67 Views
MVVM
This is a migrated thread and some comments may be shown as answers.
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
sitefinitysteve asked on 14 May 2012, 02:02 PM
<div data-role="rangeslider" data-bind="value: Capacity, events: {change: editCapacity}" data-max="20">                   
                            <input />
                            <input />
                        </div>

//From the model
editCapacity: function (site) {
            saveCapacity(site);
        }


function saveCapacity(site){
    var data =
            { "id": viewModel.BlockID ,
                "campusid": viewModel.selectedCampus.get("CampusID"),
                "rotationid": viewModel.selectedRotation.get("RotationID"),
                "siteid": site.data.get("SiteID"),
                "min": site.data.get("Capacity")[0],
                "max": site.data.get("Capacity")[1]
            };
 
    $.ajax({
        url: "/api/cps/clerkship/blocks/" + viewModel.BlockID + "/editcapacity",
        type: "PUT",
        data: data,
    }).done(function () {
         
    });
}

So let say the values initally are 0, 10.  If I change the slider to 0, 5, this function triggers, but the Capacity value is still 0,10.  The 0,5 is set after this finishes running.

3 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 15 May 2012, 09:37 AM
Hello Steve,

The issue you have described has been already addressed. The fix will be included in the next service pack.

Regards,
Rosen
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 15 May 2012, 01:07 PM
Would it be possible to get this into a ticket (#542303)?

It's holding up my forms release...

I'm curious though "has been already addressed" makes it sound like it was done a while ago, and I'm using a pretty recent beta version (I thought anyway)

Steve
0
Rosen
Telerik team
answered on 15 May 2012, 04:34 PM
Hi Steve,

You should be able to download the Q1 2012 Commercial Service Pack of KendoUI from your account. This release should contain the fix.

Regards,
Rosen
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
MVVM
Asked by
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Answers by
Rosen
Telerik team
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Share this question
or