DataTable Edit - Click Outside Cell Problem

UI Components for Angular
myElectrical
Posts: 5
Joined: 18 Nov 2016, 14:13

27 Feb 2017, 23:07

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

remya.jacobn
Posts: 14
Joined: 22 Sep 2016, 04:32

01 Mar 2017, 03:13

Hi,

We are also facing this issue.
Kindly let us know if there is any work around for this.
Regards,
RJ
PrimeNG: 2.0.0
Ultima: 1.0.2

chrisbright10
Posts: 3
Joined: 10 Mar 2017, 19:29

10 Mar 2017, 19:34

This problem is still an issue and has caused a break in production for us. Could someone look at this soon please?

smachado
Posts: 8
Joined: 17 Aug 2016, 00:43

03 Apr 2017, 07:36

Any updates on this?

onEditComplete should fire when losing focus, not just on enter key.

mpulido
Posts: 1
Joined: 10 Apr 2017, 00:43

12 Apr 2017, 11:20

Same problem here!
+1

jcgil69
Posts: 2
Joined: 31 Mar 2017, 12:11

21 Apr 2017, 11:03

We are having same problem
+1

with Primeng 4 RC3

alexey93
Posts: 65
Joined: 24 Jan 2017, 14:09

21 Apr 2017, 11:26

+1
The onChange event does not get triggered without confirming with "enter" since version 2.X. I know that it worked when I started using PrimeNG.

joshdanhall
Posts: 3
Joined: 09 Sep 2016, 07:13

26 Apr 2017, 03:39

Same problem here!
+1

joshdanhall
Posts: 3
Joined: 09 Sep 2016, 07:13

27 Apr 2017, 01:35

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....
    }

igogu
Posts: 20
Joined: 05 Dec 2016, 11:35

02 May 2017, 14:17

Same problem here!
+1

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests