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

    Hello,

    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:

    http://trykendoui.telerik.com/iBec

    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?

    Thanks.
  2. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 28 Mar 2014 Link to this post

    Hi,

    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. 

    Regards,
    Petyo
    Telerik
     
    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
Back to Top