Removing rows from "itemsEdited"

Posted by: matt_baker on 26 March 2021, 5:44 am EST

  • Posted 26 March 2021, 5:44 am EST

    I need to be able to remove items from the `itemsAdded`, `itemsEdited`, and `itemsRemoved` arrays (another part of my code can delete these items outside of being tracked by the collectoinview).

    My workaround now is to use my own arrays that filter out unwanted items.. is there a way to remove on certain items from the changes array?
  • Marked as Answer

    Replied 29 March 2021, 10:55 pm EST

    Hi Matt,

    You can remove specific items from the itemsEdited (or other arrays) array by removing them from the itemsEdited collectionView. You can refer to the following code snippet and sample demonstrating the same:

    let removeValFromIndex = [0, 2];
    for (var i = removeValFromIndex.length - 1; i >= 0; i--)
    edited.collectionView.items.splice(removeValFromIndex[i], 1);

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels