Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d98mj-00006c-Ur for pgadmin-hackers@arkaria.postgresql.org; Fri, 12 May 2017 11:31:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d98mj-0008IQ-B2 for pgadmin-hackers@arkaria.postgresql.org; Fri, 12 May 2017 11:31:01 +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 1d98mh-0008IE-JB for pgadmin-hackers@postgresql.org; Fri, 12 May 2017 11:30:59 +0000 Received: from mail-io0-x22b.google.com ([2607:f8b0:4001:c06::22b]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1d98md-0001aK-Fs for pgadmin-hackers@postgresql.org; Fri, 12 May 2017 11:30:57 +0000 Received: by mail-io0-x22b.google.com with SMTP id p24so38226220ioi.0 for ; Fri, 12 May 2017 04:30:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ZXmRRZIRMHrEt/WIf/pfbF6V36JZxO8aDqdgAipfaTk=; b=sghwruliLMfq//i+RRQm0xuANcC5xAuTell1wL/orPv22BIPbA5kw6tzf/I3pq4BUc wiQ7xMg5QbtElpiVucde4PlbCx9mEUF33L8Zv6Ae5nLurHJBDSyTqKa5O7emCw4/OhC5 v3hQ+gGIvlLdwpVvjwSwJXA+veAXbMaGYVYT/Xy2DSpj9mPOkVnXiVaWAPRjDcc/nurD Qz5uQtOvEIBUu9xUO6OKRF2fJWUZvLzmuK0zi5obcybRZ/POZNMnMFwliU3P/A0ydRAX yILVqiAvAvqTXmK8ga8/PG+koZXUFG6XBh7iyRpvltxK4MI9ohsFpmxAqbMZbOASUwBr kCtg== 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=ZXmRRZIRMHrEt/WIf/pfbF6V36JZxO8aDqdgAipfaTk=; b=pmGLb15PaQp0NRIUe6TtR4dEjYr6YtkdPwd/dW3XOLbYSIz1NoYeNNqn61n3ECbyJV 5UfeFm8RscYZPUOmOCzF7MEcM3L4znK0uMXu/1vNGYj5Fec7UcJ6znclOnIdhAyQAryG B+wHbkCyJPhLwGR5ce7frlMBq4Kxr/ojeOT9SBJ74gfaPi0L8Poj+GZyQhe2ohflzMAw kpTXtY8faNrLh37259guSHc8kEPWnrhAQVnmcblt8BnegUFcJ/t6LaaX6CA5X7+v7Z+o zjEO5zdglHJH6ALKdaGijd+g5LQWIe6GIlwt7efm5/VZkzDf0UQ1ZYL2Lh7uN/NigOwL yj9Q== X-Gm-Message-State: AODbwcA0h6+DUt+eGJCQsdAX/oYNaT5GBtaffAbrAbZekfi9DU26vPbc ADjj/CajlzZw+1sp73DYk/riV0/C9g== X-Received: by 10.107.13.16 with SMTP id 16mr2929378ion.144.1494588653799; Fri, 12 May 2017 04:30:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.174.167 with HTTP; Fri, 12 May 2017 04:30:52 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Fri, 12 May 2017 12:30:52 +0100 Message-ID: Subject: Re: pgAdmin 4 commit: Improve handling of nulls and default values in the d To: Harshal Dhumal Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="001a1140a358cb9678054f52097f" X-Pg-Spam-Score: -2.6 (--) 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 --001a1140a358cb9678054f52097f Content-Type: text/plain; charset="UTF-8" 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 last > 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 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? -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company --001a1140a358cb9678054f52097f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Fri, May 12, 2017 at 12:19 PM, Harshal Dhumal <= harsha= l.dhumal@enterprisedb.com> wrote:
Hi,

Below code snippet from abov= e commit assumes that we have to disable last row after saving.
<= br>
@@ -2320,6 +23= 40,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_adde= d)=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= self.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

For e= .g=C2=A0
Table has some data already and If user adds new row (do= not save) and then copy past few exiting rows (at this point =C2=A0newly a= dded row no longer remains at last position). And after saving it disable l= ast 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

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

EnterpriseDB UK: http://www.enterprisedb.com<= br>The Enterprise PostgreSQL Company
--001a1140a358cb9678054f52097f--