Hi,
PFA minor patch to fix the issue where node rename is not working properly
after 7dd9efd8
<https://redmine.postgresql.org/projects/pgadmin4/repository/revisions/7dd9efd811c7845d9dc985b66f8d33497f2f4bfa>
commit
.
RM#2355
--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git a/web/pgadmin/browser/templates/browser/js/browser.js
b/web/pgadmin/browser/templates/browser/js/browser.js
index a663ae8..aceda92 100644
--- a/web/pgadmin/browser/templates/browser/js/browser.js
+++ b/web/pgadmin/browser/templates/browser/js/browser.js
@@ -1207,10 +1207,8 @@ function(require, $, _, S, Bootstrap, pgAdmin, Alertify,
CodeMirror) {
// if label is different then we need to
// refresh parent so that node get properly
// placed in tree
- if(this.d.label != this.new.label) {
- var p = this.t.parent(this.i);
- pgAdmin.Browser.onRefreshTreeNode(p);
- }
+ var is_refresh_required = this.d.label != this.new.label,
+ parent_item = this.t.parent(this.i);
self.t.openPath(self.i);
self.t.deselect(self.i);
@@ -1218,6 +1216,9 @@ function(require, $, _, S, Bootstrap, pgAdmin, Alertify,
CodeMirror) {
// select tree item after few milliseconds
setTimeout(function() {
self.t.select(self.i);
+ if (is_refresh_required && parent_item.length) {
+ pgAdmin.Browser.onRefreshTreeNode(parent_item);
+ }
}, 10);
}
}
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers