My html template:
Code: Select all
<td *ngFor="let col of databaseStructure.columns" pEditableColumn>
<p-cellEditor>
<ng-template pTemplate="input">
<input type="text" [(ngModel)]="rowData[col.field]" (keydown)="editValue(rowData,col.field)">
</ng-template>
<ng-template pTemplate="output">
{{rowData[col.field]}}
</ng-template>
</p-cellEditor>
</td>