Currently having an issue that when sort is clicked the column that has formControls in an array by row the data & controls are not updated correctly. All other columns are updating as expected. Below is the code that has the formControls:
<form [formGroup]="rackAverageForms[i]">
<md-input-container>
<input [formControl]="rackAverageForms[i].controls.rackAverage" #rackAverage
formControlName="rackAverage"
(keydown.tab)="validateRackAverage(rackAverage,i)" class="numeric-field" [numberOnly]="true"
mdInput value="{{row.chosenDateRackAverage | currency:'USD':true:'1.4-4'}}">
<md-error><strong>{{formErrors[i].rackAverage}}</strong></md-error>
</md-input-container>
</form>
Here is a screenshot of before sort: md-table view before trying to sort
This is after sorting and the data is gone: md-table view after sorting with missing data
Sometimes there is one value that will hang around, but most of the time all of the values in this column are gone and controls gone as well. Please help.
After trying a few different things, switching to using the row.id unique value to look up the formcontrol it is now working. See fixed html below: