title: Error: Cannot find control with path of arrayname => formarray inside mat table in angular8?
body: <p>HTML:(Here I have a table with formArray.I want to patch Value When I select the Value from Pomaterials array.It is there bottom of the table. but When i select the item, its throwing error,cannot find control with path.I have tried formControls instead of datasource, still its giving same error. can you help me?)</p>
  
  <pre><code>      &lt;div class="mat-elevation-z8"&gt;
                 &lt;table mat-table [dataSource]="dataSource"  formArrayName="receive_mat"&gt;
                 &lt;tr mat-header-row *matHeaderRowDef="displayedColumns"&gt;&lt;/tr&gt;
                 &lt;tr mat-row *matRowDef="let row; let index = index; columns:displayedColumns;" 
                  [formGroupName]="index"&gt;&lt;/tr&gt;
                      &lt;ng-container matColumnDef="material"&gt;
                         &lt;th mat-header-cell *matHeaderCellDef&gt;Material&lt;/th&gt;
                         &lt;td mat-cell *matCellDef="let element"&gt;
                             &lt;mat-form-field floatLabel="never" style="width: 76px"&gt;
                                 &lt;input matInput  type="text" formControlName="material" readonly/&gt;
                             &lt;/mat-form-field&gt;
                          &lt;/td&gt;
                     &lt;/ng-container&gt;
  
                     &lt;ng-container matColumnDef="qty_receiving"&gt; 
                         &lt;th mat-header-cell *matHeaderCellDef&gt;Qty Receiving&lt;/th&gt;
                         &lt;td mat-cell *matCellDef="let element"&gt; 
                         &lt;mat-form-field floatLabel="never" style="width: 76px"&gt;
                             &lt;input matInput  type="number" formControlName="quantityreceiving"&gt;
                         &lt;/mat-form-field&gt;
                        &lt;/td&gt;
                     &lt;/ng-container&gt;
                     &lt;ng-container matColumnDef="best_before"&gt; 
                         &lt;th mat-header-cell *matHeaderCellDef&gt;Best Before&lt;/th&gt;
                         &lt;td mat-cell *matCellDef="let element"&gt; 
                         &lt;mat-form-field style="width: 80px"&gt;
                             &lt;mat-label&gt;Best Before&lt;/mat-label&gt;
                                 &lt;input matInput [matDatepicker]="picker" formControlName="bestbefore" readonly/&gt;
                                 &lt;mat-datepicker-toggle matSuffix [for]="picker"&gt;&lt;/mat-datepicker-toggle&gt;
                                 &lt;mat-datepicker #picker disabled="false"&gt;&lt;/mat-datepicker&gt;    
                             &lt;/mat-form-field&gt;
                         &lt;/td&gt;
                     &lt;/ng-container&gt;
                     &lt;ng-container matColumnDef="delete"&gt; 
                         &lt;th mat-header-cell *matHeaderCellDef&gt;&lt;/th&gt;
                         &lt;td mat-cell *matCellDef="let element"&gt; 
                             Delete&lt;mat-icon (click)="removeElement(element, index)"&gt;cancel&lt;/mat-icon&gt;
                         &lt;/td&gt;
                     &lt;/ng-container&gt;
           &lt;/table&gt;
         &lt;!-- &lt;button&gt;add&lt;/button&gt; --&gt;
         &lt;mat-form-field style="width:100px;margin-left:10px;"&gt;
             &lt;mat-select  placeholder="Select Material" [(value)]="data"
              (selectionChange)="selectedItem(data)" &gt;
                 &lt;mat-option *ngFor="let item of poMaterials" [value]="item"&gt;{{item.material_id.title}}&lt;/mat-option&gt;
             &lt;/mat-select&gt;
         &lt;/mat-form-field&gt;
             &lt;mat-paginator [pageSizeOptions]="pageSizeOptions" showFirstLastButtons&gt;&lt;/mat-paginator&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p>component.ts:</p>
  
  <pre><code>   ngOnInit(){ 
            this.receiveForm = new FormGroup({
                'receive_mat': new FormArray([]),
            })
      this.receive_mat = this.receiveForm.get('receive_mat') as FormArray;
     this.dataSource = new MatTableDataSource((this.receiveForm.get('receive_mat') as FormArray).controls);
    }
     selectedItem(item){
      console.log(item)
      this.dataSource = new MatTableDataSource((this.receiveForm.get('receive_mat') as FormArray).controls);
      this.addItem(item)
    }
    createItem(item): FormGroup {
      console.log(item)
      return this._formBuilder.group({
        'material': new FormControl(item.material_id.title, Validators.required),
        'quantityreceiving': new FormControl(null, Validators.required),
        'bestbefore': new FormControl(new Date()),
      })
    }
    addItem(item){
      console.log(item)
      this.receive_mat.push(this.createItem(item))
  }
  
  </code></pre>