Unusual behaviour using 'splice' on an obvserableArray

2 posts, 0 answers
  1. London TIO
    London TIO avatar
    3 posts
    Member since:
    Aug 2013

    Posted 27 Mar 2014 Link to this post


    When I remove an item from an array using splice, as per your examples, it appears that two items are being removed from the array rather than just one.
    I've created an example below:


    It seems to be caused by using the 'set' command against the array:

    viewModel.set('data.files', fileCollection);

    Am I using the set command in the wrong way?

  2. Petyo
    Petyo avatar
    2444 posts

    Posted 28 Mar 2014 Link to this post


    Thank you very much for bringing this to our attention - indeed, the issue is caused by the set call. We are going to fix it - meanwhile you can avoid it by using the following setter:

    viewModel.data.set('files', fileCollection);

    I am updating your telerik points for your help. 

    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top