title: AG-Grid: Cannot update field in Grid as it is read only
body: <p>I am trying to update a field in ag-grid and it keeps coming back with ERROR TypeError: Cannot assign to read only property 'quantity' of object '[object Object]'.</p>
  
  <p>It allows me to edit the cell but when i try to update it comes up with this error.</p>
  
  <p>I am using an observable from an ngrx store to populate the rowData as below:</p>
  
  <pre><code>this.order$.subscribe(order =&gt; {
              this.order = { ...order, products: [...order.products] };
          });
  </code></pre>
  
  <p>I have checked the above and I can update this object by saying this.orders.products = [] which says to me it is no longer immutable.</p>
  
  <pre><code> &lt;mi-ag-grid [data]="order.products" [columnDefs]="columnDefs" [suppressClickEdit]="false"&gt;&lt;/mi-ag-grid&gt;
  
  columnDefs = [
          {
              headerName: 'Code',
              field: 'code',
              width: 150
          },
          {
              headerName: 'Name',
              field: 'name',
              width: 200,
              editable: true
          },
          {
              headerName: 'Quantity',
              field: 'quantity',
              width: 150,
              editable: true
          }
      ];
  </code></pre>
  
  <p>I next tried suggestion from @GreyBeardedGeek and tried to set value with a valueSetter as per below, but still getting same error.</p>
  
  <pre><code>,
      {
          headerName: 'Quantity',
          width: 150,
          editable: true,
          field: 'quantity',
          valueSetter: quantityValueSetter
      },
  
  
  function quantityValueSetter(params): any {
  console.log(params);
  params.data.quantity = params.newValue;
  </code></pre>
  
  <p>}</p>