title: Auto-fill input field based on another input field angular 6
body: <p>I have input field inside on ngx-data-table, when user update the value of input field, the another input field value needs to be auto field. Below is my code for my first input field</p>
  
  <pre><code>&lt;ng-template *ngIf="col.name == 'comment' || col.label == 'comment'"
                       ngx-datatable-cell-template let-rowIndex="rowIndex" let-value="value" let-row="row"
                       let-group="group" let-rowHeight="rowHeight"&gt;
              &lt;input autofocus
                     (blur)="updateValue($event, 'comment', rowIndex)"
                     type="text"
                     name="comment"
                     [value]="value" /&gt;
          &lt;/ng-template&gt;
  </code></pre>
  
  <p>When user fill data on above input field, the below input field needs to be auto populated.</p>
  
  <pre><code>&lt;ng-template *ngIf="col.name == 'discussion' || col.label == 'discussion'"
  ngx-datatable-cell-template let-rowIndex="rowIndex" let-value="value" let row="row" &gt;
  &lt;span [(ngModel)]="discussion"&gt;{{discussion}}&lt;/span&gt;
  &lt;/ng-template&gt;
  </code></pre>
  
  <p>Here is my ts code</p>
  
  <pre><code>updateValue(event, cell, rowIndex)
      {
      console.log('inline editing rowIndex', rowIndex)
      this.editing[rowIndex + '-' + cell] = false;
      this.rows[rowIndex][cell] = event.target.value;
      this.discussion= [...this.rows];
      console.log('UPDATED!', this.discussion[rowIndex][cell]);
  }
  </code></pre>
  
  <p>This code is not working correctly, giving error "ERROR TypeError: Cannot set property 'comment' of undefined".</p>
  
  <p>I want when user update the value of input field, the another input field value needs to be auto field.</p>
  
  <p>Please help or  any another way to achieve this.</p>