Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d98cQ-00085U-MS for pgadmin-hackers@arkaria.postgresql.org; Fri, 12 May 2017 11:20:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d98cQ-0007cb-7C for pgadmin-hackers@arkaria.postgresql.org; Fri, 12 May 2017 11:20:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d98cA-00077i-DO for pgadmin-hackers@postgresql.org; Fri, 12 May 2017 11:20:06 +0000 Received: from mail-it0-x22f.google.com ([2607:f8b0:4001:c0b::22f]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1d98c1-0005St-Qu for pgadmin-hackers@postgresql.org; Fri, 12 May 2017 11:20:05 +0000 Received: by mail-it0-x22f.google.com with SMTP id o5so8616714ith.1 for ; Fri, 12 May 2017 04:19:57 -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=FTQHamT++VBLmzCgm7busO/0389XIr0O6ZJonqGzIsk=; b=lZSA5Qo596P03C1ty6b0pp0EjMKMxJSLPvtZUe42uL2mThEuKvtpTsMYwrdhy+fkTA eeU8KlCm/3+3zDLUpO9/nTwZmKPNQdr2XWdWo08Jq6SP1ggoId3G/Vn7XblvyZOkl1uP 4LKdWLfrhr5iJNVhWx2RKnrKGs6M7nJhWjr+kPulRCffI69f+9Kh5Ot0YkFB6+v4dEVC pU4IguEZ8mpAq0FMN9MVG5K9DUkzNBuWwinGMez0PysNR8Zob3DlaXv7kQtP4ukxx13o 8gikMk+juUre42Xfe52l/dWST5RrKT9/hQKhIKskL12aJ8Gq/jDdNtkpTenCWjoY0L3Z UxSA== 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=FTQHamT++VBLmzCgm7busO/0389XIr0O6ZJonqGzIsk=; b=DCBqyV7765toDI1O+hNSRBbktHJTjUfNlazCmhE6dSpNzg8Z3vJzLj+JpDfaENfN9/ ELIqLeqNu9YlfuVFUmlH7HND4rG/1ov51DIV8ffusfKda6qsJc9Bt96OyI6Dzgv5hj/T 2s66G5nFnW/+yCQlliIGEwZfBlymwsN3e2LtJ1uIBKso9CkhYLmZwJgDy/FPhmonow6m yWbwCws3nUJ9Pf+z4FCulfNhHUPvY8CjOxV8HHb8PYRsvxYZuPyy8UbBaTy0kbAlTo3v ARy6rWO27ozyVQUDO3q/I+c5UyYO9DqcuS259wg+0s2er9NyuIQWyRd+Xwp8BiyMZXPR +hHg== X-Gm-Message-State: AODbwcAPyzVcI9a7mx2q1jdqQKZtYpZ3dSX3sSmlFHbSemU/ExvBSAHj dIDeYyfpblUa96q31wRPVXIvfx610Ulh X-Received: by 10.36.222.214 with SMTP id d205mr2990970itg.50.1494587995950; Fri, 12 May 2017 04:19:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.38.15 with HTTP; Fri, 12 May 2017 04:19:55 -0700 (PDT) In-Reply-To: References: From: Harshal Dhumal Date: Fri, 12 May 2017 16:49:55 +0530 Message-ID: Subject: Re: pgAdmin 4 commit: Improve handling of nulls and default values in the d To: Dave Page Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="94eb2c05ad1095a85e054f51e2a7" 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 --94eb2c05ad1095a85e054f51e2a7 Content-Type: text/plain; charset="UTF-8" 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. -- *Harshal Dhumal* *Sr. Software Engineer* EnterpriseDB India: http://www.enterprisedb.com The Enterprise PostgreSQL Company On Fri, May 12, 2017 at 3:24 PM, Dave Page wrote: > Improve handling of nulls and default values in the data editor. Fixes > #2257 > > Branch > ------ > master > > Details > ------- > https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h= > 4f9628ed436de53b1ab1a06b123755a86a8f2288 > Author: Surinder Kumar > > Modified Files > -------------- > .../tables/templates/column/sql/9.2_plus/nodes.sql | 3 +- > .../tables/templates/column/sql/default/nodes.sql | 3 +- > web/pgadmin/static/css/pgadmin.css | 2 +- > .../static/js/slickgrid/slick.pgadmin.editors.js | 39 +++++++++++++++--- > .../js/slickgrid/slick.pgadmin.formatters.js | 46 > ++++++++++++++++------ > web/pgadmin/tools/sqleditor/__init__.py | 25 +++++++++++- > web/pgadmin/tools/sqleditor/command.py | 30 +++++++++++++- > .../tools/sqleditor/static/css/sqleditor.css | 12 +++++- > .../sqleditor/templates/sqleditor/js/sqleditor.js | 28 ++++++++++++- > 9 files changed, 163 insertions(+), 25 deletions(-) > > > -- > Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgadmin-hackers > --94eb2c05ad1095a85e054f51e2a7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

Below code snippet from above commi= t assumes that we have to disable last row after saving.











On Fri, May 12, 2017 at 3:24 PM, Dave Page <= span dir=3D"ltr"><dpage@pgadmin.org> wrote:
= Improve handling of nulls and default values in the data editor. Fixes #225= 7

Branch
------
master

Details
-------
https://git.postgresql.org/gitweb?p=3Dpgadmin4.git;a=3Dcommitdiff;h=3D4f9628ed436de53b1ab1a06b123755a86a8f2288
Author: Surinder Kumar <surinder.kumar@enterprisedb.com>

Modified Files
--------------
.../tables/templates/column/sql/9.2_plus/nodes.sql |=C2=A0 3 +-
.../tables/templates/column/sql/default/nodes.sql=C2=A0 |=C2=A0 3 +- web/pgadmin/static/css/pgadmin.css=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 2 +-
.../static/js/slickgrid/slick.pgadmin.editors.js=C2=A0 =C2=A0| 39 ++++= +++++++++++---
.../js/slickgrid/slick.pgadmin.formatters.js=C2=A0 =C2=A0 =C2=A0 =C2= =A0| 46 ++++++++++++++++------
web/pgadmin/tools/sqleditor/__init__.py=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 | 25 +++++++++++-
web/pgadmin/tools/sqleditor/command.py=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0| 30 +++++++++++++-
.../tools/sqleditor/static/css/sqleditor.css=C2=A0 =C2=A0 =C2=A0 =C2= =A0| 12 +++++-
.../sqleditor/templates/sqleditor/js/sqleditor.js=C2=A0 | 28 +++++++++= +++-
9 files changed, 163 insertions(+), 25 deletions(-)


--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-ha= ckers

--94eb2c05ad1095a85e054f51e2a7--