I have a table of items and the table cells are inline editable. I want to implement a feature to undo changes to each cell, so I made a copy of each object of the array at the begining.

```
this.mapedArr = this.arr.map(i => {
  i.oldValues = Object.assign({}, i);
  return i;
})

```

Then after clicking cancel, I copy the old values instead of the new values. 

```
cancel(i) {  
   i = Object.assign({}, i.oldValues);
}

```

If you check the [stackblitz](https://stackblitz.com/edit/angular-5yupw9), where I tryied to implement a small example of what I have, you can see in the console that the values change back to the old values but don't reflect the results in the view. Where is the problem?