I have a working primeng table that I wanted to make the rows editable for and followed their documentation to do so. But it throws me the following error when it tries to load
NullInjectorError: No provider for EditableRow
My p-table definition has the following
<p-table
[columns]="selectedColumns"
[value]="tableData"
[resizableColumns]="true"
[reorderableColumns]="true"
[paginator]="true"
[rows]="10"
[rowsPerPageOptions]="[5, 10, 25, 50, 100]"
editMode="row"
>
and since I'm loading in different cases of dynamic data my row definition is (it's a lot but mostly just copy/paste from their template):
<ng-template *ngIf="canEdit" pTemplate="body" let-rowData let-editing="editing" let-ri="rowIndex">
<tr [pEditableRow]="rowData">
<ng-container *ngFor="let col of selectedColumns">
<td>
<p-cellEditor>
<ng-template pTemplate="input">
<input pInputText type="text" [(ngModel)]="rowData[col.field]" required />
</ng-template>
<ng-template pTemplate="output">
{{ rowData[col.field] }}
</ng-template>
</p-cellEditor>
</td>
</ng-container>
</tr>
<td style="text-align:center">
<button
*ngIf="!editing"
pButton
type="button"
pInitEditableRow
(click)="onRowEditInit(rowData)"
>edit</button>
<button
*ngIf="editing"
pButton
type="button"
pSaveEditableRow
style="margin-right: .5em"
(click)="onRowEditSave(rowData)"
>save</button>
<button
*ngIf="editing"
pButton
type="button"
pCancelEditableRow
(click)="onRowEditCancel(rowData, ri)"
>cancel</button>
But it doesn't like the pInitEditableRow / pSaveEditableRow / pCancelEditableRow
As that's what the errors complain about. I have the Table imported in my app modules and none of the examples have anything else brought in so I'm not sure why it's saying there is no provider for the EditableRow.