I'm submitting a ...
[X] bug report
[ ] feature request
[ ] support request
http://plnkr.co/edit/Lvy82I95GtsNi06c8h4x?p=preview
Current behavior
When completing an edit in the DataTable by clicking outside of the field being edited, the OnEditComplete event does not run.
Expected behavior
The OnEditComplete event should run whenever the field being edited loses focus.
This should be fixed in recent PrimeNG release, please try with it and if the issue persists drop a comment with along with a test case based on plunkr below and we'll review again.
Seems to still exist as of 4.1.0-rc2 and Angular 4.2.4
initially, #2535 reported as
DataTable onEditComplete Event is not fired when user hit "Tab" on keyboard or any other method to navigate out of the Editable column.
However, developer changed it and support when user click the "Tab" key.
Could you please say when it will be fixed ?
Same problem here. Is a good idea when user clicks outside, the content of the cell can (at least) revert to the original content. If user does click outside and the content is the new one, then the user could feel that the contents is saved.
Yes, I too am having a real problem with not having onBlur event at table or cell level. We are saving row data when user tabs out of last column, or user clicks in another row field. When user clicks in field of another row, we lose context of previous row so have to make a work around.
Hi i am not able to fire event on onEditComplete, onValueChange, onEditCancel in p-datatable so Could you please say how to resolve it.
p-dataTable is deprecated and will be removed in favor of the new p-table (aka TurboTable) of 5.1.0 so closing the issue. Please try the new p-table once 5.1.0 is released.
In p-table too onEditComplete is not working,
Please resolve this problem
Improvement --> In p-table onEditComplete works only when Enter key is pressed. Is it possible to enable this to tab key?, I saw the implementation and is only available for Enter key.
Have same issue, it's not getting fired even in turbo table.
For me, it has worked calling the method focusout in the input, and then, manipulating editingcell
In html:
<p-table #tableId>
<p-cellEditor *ngIf="col.editable != undefined && col.editable">
<ng-template pTemplate="input">
<input type="text" (focusout)="focusoutcell(tableId)"/>
</ng-template>
</p-table>
In ts:
focusoutcell(table) {
$(table.editingCell).removeClass('ui-editing-cell');
table.editingCell = null;
}
Same error here in turbo table.
plz help
Same error here
When we made change in one input field and then click on another input field it doesn't fire onEditComplete event. however it works for enter and tab key
Yes, this is still a problem. Clicking between input fields doesn't trigger onEditComplete event. Anyone got a fix for that?
@mikeveltman - Did you have any luck in fixing this?
@michaelferry We made custom cell-input and cell-display components. The custom cell-input component outputs a cellEditComplete event at a blur event of the input inside the cell-input component. But the issue itself is not fixed.
Most helpful comment
In p-table too onEditComplete is not working,
Please resolve this problem