Angular Material editable table using FormArray

后端 未结 5 1781
不思量自难忘°
不思量自难忘° 2020-12-14 17:17

I\'m trying to build an inline editable table using the latest material+cdk for angular.

Question

How can I make mat-table use [formG

5条回答
  •  太阳男子
    2020-12-14 17:55

    I would use the index which we can get within matCellDef binding:

    *matCellDef="let row; let index = index" [formGroupName]="index"
    

    Forked Stackblitz

    For solving problems with sorting and filtering take a look at this answer Angular Material Table Sorting with reactive formarray

提交回复
热议问题