complete event after remove operation not fired

4 posts, 1 answers
  1. frederic
    frederic avatar
    12 posts
    Member since:
    Apr 2015

    Posted 28 Mar 2017 Link to this post

    Hi team,

    The complete event is not fired after a remove operation. Why ?

    I need to do some data consolidations after a remove operation by looping thru .k-file.k-file-success <li>

    At present (kendo 2016.1.226), I was using the success event to do so, and it was ok.

    Now (updrade to kendo 2017.1.223), It seems that a .k-file.k-file-success <li> removal is deffered and so is still present on success event.

     

    Please advise,

     

    Best regards.

     

     

  2. Ivan Danchev
    Admin
    Ivan Danchev avatar
    2083 posts

    Posted 29 Mar 2017 Link to this post

    Hello Frederic,

    Indeed the k-file-success class is still present by the time the success event fires following the remove event. As a workaround you could use a flag in the remove event and then execute your code that checks for the presence of selected files with a slight delay (needed for the files to be removed) by using the setTimeout method:
    var isRemove = false;
     
    function onSuccess(e) {
        if (isRemove) {
            isRemove = false;
            setTimeout(function () {
                //...
            }, 100);
        }
    }
     
    function onRemove(e) {
        isRemove = true;
    }


    Regards,
    Ivan Danchev
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. frederic
    frederic avatar
    12 posts
    Member since:
    Apr 2015

    Posted 30 Mar 2017 in reply to Ivan Danchev Link to this post

    Hi Ivan,

    Thank you for your prompt answser with the workaround. Actually, this is the one I already have implemented.

    Woudn't it be nice to have a sort of complete event for remove operations ?

    Best regards.

  4. Answer
    Ivan Danchev
    Admin
    Ivan Danchev avatar
    2083 posts

    Posted 31 Mar 2017 Link to this post

    Hello Frederic,

    We agree that it would be helpful in scenarios similar to yours. We would suggest logging this as a feature request in our public Feedback Portal and voting for it.

    Regards,
    Ivan Danchev
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top