Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d995Z-00013j-AX for pgadmin-hackers@arkaria.postgresql.org; Fri, 12 May 2017 11:50:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d995Y-0002eB-3y for pgadmin-hackers@arkaria.postgresql.org; Fri, 12 May 2017 11:50:28 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d995I-0002Bi-C9 for pgadmin-hackers@postgresql.org; Fri, 12 May 2017 11:50:12 +0000 Received: from mail-wr0-x232.google.com ([2a00:1450:400c:c0c::232]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1d995E-0001tJ-Cw for pgadmin-hackers@postgresql.org; Fri, 12 May 2017 11:50:10 +0000 Received: by mail-wr0-x232.google.com with SMTP id l9so42835850wre.1 for ; Fri, 12 May 2017 04:50:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=8Lb3bT2yN7lZ4eQlY7gGBLOzmmESR2106YK7VBrKh0c=; b=XwzhS7ESSi3+vjW9nwcSkB+yGgLXmqlOmYfKwTXQxfVSv3+Qa2m4jEvvIxruWQ+8Fm JMYS4BiHJejkngcKvZLPFJoLEcNVRp6C1EZ9iKlHZb93kseYDtWzmbxFAMXUGn4UjK0w dUFCsepF7n/JV6fgnRHNib4MagHV54U1DMXqMSDbdkE+/CcXm1vCLF0Y4Z0L4zwm32NQ NnwzdYk7C78Cgf8euZZeEjC2RBeMtCGkIB6R7t2qVBLoMUVt0qj3E168RUP4K+YCCANm h2F+YfCw3V5IlCx5kzE6tSlPkFzayUXrqNgiPyLQkDVuOnYSFBi4f5Vquv3v6kfMm44b panA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=8Lb3bT2yN7lZ4eQlY7gGBLOzmmESR2106YK7VBrKh0c=; b=BmU8au1vJOTX95v4ZlF2QDdbYUACSTNi+Co/dODb1Bo2VqM2zeTlxybzk7NXsmLdic x1tv9FDPQABzMXVb2F8WHMtpydEpIC1hmbHo+KSgysNW3QpiYijfnzqyHVIMcZAguiwC Gi2YCPTf9BVFTt0UhITHaR9vlBbH8bUxuCDqA8dHtK+pIhMQnMzhNC+Z9fKWQ52Ss/de 8e0jffWwEP4jb1kIt2MCpmDSKLj7+heKGe054VMUThpfbA3rnjIV2DrB5hr2TChuk3SO SCqyvgX6w7kd91pvO43rEQL0wCWJJoHVIXiy+BHDn2o2tcPGDuyKSahRlMSzfUEEmzze AQJg== X-Gm-Message-State: AODbwcBzHmPlYQfCBppU3DTt0Q1sF7Whk+o5BGsZjcMbi/hbxtEQu8Yc bh+Dwa47yi8MMK7x8NJuHrv3KB8O6fy0 X-Received: by 10.223.134.46 with SMTP id 43mr3079991wrv.123.1494589806417; Fri, 12 May 2017 04:50:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.19.138 with HTTP; Fri, 12 May 2017 04:49:35 -0700 (PDT) In-Reply-To: References: From: Surinder Kumar Date: Fri, 12 May 2017 17:19:35 +0530 Message-ID: Subject: Re: pgAdmin 4 commit: Improve handling of nulls and default values in the d To: Dave Page Cc: Harshal Dhumal , pgadmin-hackers Content-Type: multipart/alternative; boundary="001a1146b7bc7f5e1b054f524ec7" X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org --001a1146b7bc7f5e1b054f524ec7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, May 12, 2017 at 5:00 PM, Dave Page wrote: > > > On Fri, May 12, 2017 at 12:19 PM, Harshal Dhumal < > harshal.dhumal@enterprisedb.com> wrote: > >> Hi, >> >> Below code snippet from above commit assumes that we have to disable las= t >> row after saving. >> >> @@ -2320,6 >> >> +2340,10 >> >> @@ define( >> grid.setSelectedRows([]); >> } >> >> + // Add last row(new row) to keep track of it >> + if (is_added) { >> + self.rows_to_disable.push(grid.getDataLength()-1)= ; >> + } >> >> However this is not the case all the time >> >> For e.g >> Table has some data already and If user adds new row (do not save) and >> then copy past few exiting rows (at this point newly added row no longe= r >> remains at last position). And after saving it disable last row which is >> not the newly added row. >> > > Hmm, good point. Can you/Surinder work up a fix for that in time for the > release please? > =E2=80=8BSure Dave, I am working on it.=E2=80=8B > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > --001a1146b7bc7f5e1b054f524ec7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On = Fri, May 12, 2017 at 5:00 PM, Dave Page <dpage@pgadmin.org> = wrote:

<= br>
On Fri, May 12, 2017 at 12:1= 9 PM, Harshal Dhumal <harshal.dhumal@enterprisedb.com> wrote:
Hi,=

Below code snippet from above commit assumes that we ha= ve to disable last row after saving.

@@ -2320,6 = +2340,10 @@=C2=A0define(
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0grid.setSelectedRows([]);
=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0}
=C2=A0
= +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0//=C2=A0Add=C2=A0last= =C2=A0row(new=C2=A0row)=C2=A0to=C2=A0keep=C2=A0track=C2=A0of=C2=A0it
+=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0if=C2=A0(is_added)=C2=A0{
+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0self.rows_to_disable.push(grid= .getDataLength()-1);
= +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0}

=C2=A0However this is not the case all the time

<= div>For e.g=C2=A0
Table has some data already and If user adds ne= w row (do not save) and then copy past few exiting rows (at this point =C2= =A0newly added row no longer remains at last position). And after saving it= disable last row which is not the newly added row.

Hmm, good point. Can you/Surinder work up a fix= for that in time for the release please?=C2=A0
=E2=80=8BSu= re Dave, I am working on it.=E2=80=8B
<= div dir=3D"ltr">

--
Dave Page
Blog: http://pgsnake.blogspot.= com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The = Enterprise PostgreSQL Company

--001a1146b7bc7f5e1b054f524ec7--