I'm encountering an issue with my mat-table. The input field within the table is not functioning properly. All rows are sharing the same input field, so when I type text into the box, it appears in all rows.
Here is my code:
<ng-container matColumnDef="Remarks">
<mat-header-cell *matHeaderCellDef>scheduled hours</mat-header-cell>
<mat-cell *matCellDef="let element">
<mat-form-field>
<input matInput [(ngModel)]="Remarks" (input)="$event.target.value.length > 2 && Remarks($event.target.value)" name="AppRemarks" #AppRemarks="ngModel" placeholder="Remarks">
</mat-form-field>
</mat-cell>
</ng-container>