public inbox for [email protected]
help / color / mirror / Atom feedFrom: Surinder Kumar <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin4][Patch]: RM1728 - Properties are not refreshing after objects are edited
Date: Fri, 23 Sep 2016 12:09:42 +0530
Message-ID: <CAM5-9D9n8nvcH44nSGKmMLfCDSV-ka5mrmcEKEdaPJN+zy5CHw@mail.gmail.com> (raw)
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgadmin-hackers>
Hi
*Issue:*
on updating node, we deselect and then again select the node updated to
refresh the panel. but it needs some delay of few milliseconds between
deselect and select to fix this issue.
Please find attached patch and review.
Thanks,
Surinder Kumar
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
Attachments:
[application/octet-stream] RM1728.patch (1.2K, 3-RM1728.patch)
download | inline diff:
diff --git a/web/pgadmin/browser/templates/browser/js/browser.js b/web/pgadmin/browser/templates/browser/js/browser.js
index 46c49cf..3652ec5 100644
--- a/web/pgadmin/browser/templates/browser/js/browser.js
+++ b/web/pgadmin/browser/templates/browser/js/browser.js
@@ -1148,7 +1148,8 @@ function(require, $, _, S, Bootstrap, pgAdmin, Alertify, CodeMirror) {
if (
this.i && this.d && this.new._type == this.d._type
) {
- var _id = this.d._id;
+ var self = this,
+ _id = this.d._id;
if (this.new._id != this.d._id) {
// Found the new oid, update its node_id
var node_data = this.t.itemData(ctx.i);
@@ -1162,7 +1163,10 @@ function(require, $, _, S, Bootstrap, pgAdmin, Alertify, CodeMirror) {
this.t.setId(ctx.id, {id: this.new.id});
this.t.openPath(this.i);
this.t.deselect(this.i);
- this.t.select(this.i);
+ // select tree item after few milliseconds
+ setTimeout(function() {
+ self.t.select(self.i);
+ }, 10);
}
}
var success = this.o && this.o.success;
view thread (12+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: [pgAdmin4][Patch]: RM1728 - Properties are not refreshing after objects are edited
In-Reply-To: <CAM5-9D9n8nvcH44nSGKmMLfCDSV-ka5mrmcEKEdaPJN+zy5CHw@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox