Fixed an issue where the browser tree state was not preserved correctly. Fixes #7176

This commit is contained in:
Pradip Parkale 2022-03-31 18:28:36 +05:30 committed by Akshay Joshi
parent 143ae19b8d
commit fe416c838b
3 changed files with 6 additions and 2 deletions

View File

@ -25,6 +25,7 @@ Bug fixes
| `Issue #4256 <https://redmine.postgresql.org/issues/4256>`_ - Fixed an issue where SQL for revoke statements are not shown for databases.
| `Issue #5836 <https://redmine.postgresql.org/issues/5836>`_ - Adds a new LDAP authentication configuration parameter that indicates the case sensitivity of the LDAP schema/server.
| `Issue #7059 <https://redmine.postgresql.org/issues/7059>`_ - Fixed an issue where the error is shown on logout when the authentication source is oauth2.
| `Issue #7176 <https://redmine.postgresql.org/issues/7176>`_ - Fixed an issue where the browser tree state was not preserved correctly.
| `Issue #7197 <https://redmine.postgresql.org/issues/7197>`_ - Fixed an issue where foreign key relationships do not update when the primary key is modified.
| `Issue #7216 <https://redmine.postgresql.org/issues/7216>`_ - Ensure that the values of certain fields are prettified in the statistics tab for collection nodes.
| `Issue #7221 <https://redmine.postgresql.org/issues/7221>`_ - Ensure objects depending on extensions are not displayed in Schema Diff.

View File

@ -266,7 +266,9 @@ define('pgadmin.node.server', [
}
t.addIcon(i, {icon: d.icon});
obj.callbacks.refresh.apply(obj, [null, i]);
t.close(i);
setTimeout(() => {
t.toggle(i);
}, 10);
if (pgBrowser.serverInfo && d._id in pgBrowser.serverInfo) {
delete pgBrowser.serverInfo[d._id];
}

View File

@ -105,6 +105,7 @@ _.extend(pgBrowser.browserTreeState, {
})
.done(function() {
self.last_state = JSON.stringify(self.current_state);
self.fetch_state();
})
.fail(function(jqx) {
var msg = jqx.responseText;
@ -260,7 +261,7 @@ _.extend(pgBrowser.browserTreeState, {
},
expand_from_previous_state: function(item) {
let self = this,
treeData = this.current_state || {},
treeData = this.stored_state || {},
data = item && pgBrowser.tree.itemData(item),
treeHierarchy = pgBrowser.tree.getTreeNodeHierarchy(item);