Problem, Randslider change event triggers BEFORE the viewmodel changes

4 posts, 0 answers
  1. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 14 May 2012 Link to this post

    <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.
  2. Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 15 May 2012 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
  4. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 15 May 2012 Link to this post

    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
  5. Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 15 May 2012 Link to this post

    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!
Back to Top
Kendo UI is VS 2017 Ready