当primeng p表上的任何可编辑单元格值发生更改时,我正在尝试调用该方法。我尝试使用 onEditComplete 事件,但它只会在我编辑单元格并按 Enter 时触发。当我编辑单元格并移出鼠标时,它不会触发。谁能建议我应该在这里添加的正确事件是什么?
<p-table [value]="sampleData" [scrollable]="true" scrollHeight="200px" [resizableColumns]="true"
(onEditComplete)="getLandLineTotal($event)">
<ng-template pTemplate="header">
<tr>
<th>Col 1</th>
<th>Col 2</th>
<th>Col 3</th>
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowData>
<tr>
<td style="width: 10%">
{{rowData.col1}}
</td>
<td>
{{rowData.col2}}
</td>
<td pEditableColumn>
<p-cellEditor>
<ng-template pTemplate="input">
<input pInputText type="text" [(ngModel)]="rowData.col3" required>
</ng-template>
<ng-template pTemplate="output">
{{rowData.col3| currency}}
</ng-template>
</p-cellEditor>
</td>
</tr>
</ng-template>
</p-table>