How could I modify the rv-reach binding so that new and changed array items are added to the dom, but removed array items not removed from the dom?
new array item > add item to dom
changed array item > change item in the dom
removed array item > do nothing
You simply have to keep it in the array to not remove it from the dom.
What you actually want to achieve is a so called "soft delete" to achieve that, you have to add a property:
removedto the item, which is set default to0, then based on that value, you can either hide the item, give it a red color etc.. while it will still be shown in the dom.So this is how i would do this to give you an example of how it will work:
then if you want to add items:
if you want to remove items for example:
eventually add some classes when the item is removed:
rv-class-danger="item.data.removed | eq 1"// adds the class dangerSo whenever you change any data, it wil change in the dom also, when you remove the item, it just sets property removed of the item to
1so you can keep it in the dom this way. And when you add an item, you just have to push it into the array and it will be added to the dom.