I have just upgraded from PrimeNG 1.1.1 to 2.0.1.
In 1.1.1, when editing a cell if I pressed 'Enter' or clicked outside of the cell, the value was updated (onEditCompete event). Since upgrading to 2.0.1, the cell gets updated if I press 'Enter', but not if I click out of the cell.
Possibly making it worse, is if I click outside, the cell still shows the edited value, but the onEditComplete event is not called (and the backend is not updated).
Steven
DataTable Edit - Click Outside Cell Problem
-
- Posts: 15
- Joined: 22 Sep 2016, 04:32
Hi,
We are also facing this issue.
Kindly let us know if there is any work around for this.
We are also facing this issue.
Kindly let us know if there is any work around for this.
Regards,
RJ
PrimeNG: 7.1.0
Ultima: 7.0.1
RJ
PrimeNG: 7.1.0
Ultima: 7.0.1
-
- Posts: 3
- Joined: 10 Mar 2017, 19:29
This problem is still an issue and has caused a break in production for us. Could someone look at this soon please?
-
- Posts: 8
- Joined: 09 Sep 2016, 07:13
While we wait for a fix, the following can be used as a workaround (basically wire up your own event handler using JQuery):-
Code: Select all
@ViewChild('myDataTable') myDataTable: DataTable;
...
...
onEditInit(event) {
/*
* Workaroud for PrimeNG dropping support for: onEditComplete() when loss of focus
* -required for primeng@4.0.0-rc.3
*/
let inputElement = $(this.myDataTable.editingCell).find('input');
const _this = this;
inputElement.on('blur', function () {
_this.onEditComplete(event);
});
/* ***************************************************************************************
* End workaround
* ***************************************************************************************/
// normal onEditInit() handling here...
}
onEditComplete(event) {
/*****************************************************************************************
* See above
*/
$(this.myDataTable.editingCell).find('input').off('blur'); // housekeeping - remove event now that we are handling the completion of the edit
/*****************************************************************************************/
// normal onEditComplete() handling here....
}
-
- Information
-
Who is online
Users browsing this forum: No registered users and 12 guests