Ensure the query tool opens successfully on renaming any tree node from the database selected for the query tool connection #5542, #5559

This commit is contained in:
Nikhil Mohite 2023-01-04 12:20:54 +05:30 committed by GitHub
parent 3841bc5253
commit 9c61670c9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -913,10 +913,12 @@ define('pgadmin.browser.node', [
if (first_child._loaded) {
tree.open(first_child);
tree.select(first_child);
} else {
const openSoleItem = setInterval(() => {
if (first_child._loaded) {
tree.open(first_child);
tree.select(first_child);
clearSoleItemInterval();
}
}, 200);
@ -925,6 +927,9 @@ define('pgadmin.browser.node', [
};
}
} else {
const first_child = tree.first(item);
tree.select(first_child);
}
pgBrowser.Events.trigger('pgadmin:browser:tree:update-tree-state', item);

View File

@ -315,10 +315,6 @@ _.extend(pgBrowser.browserTreeState, {
});
}
// Select the previously selected item
!this.is_selected && setTimeout(()=>{
pgBrowser.tree.ensureVisible(item, 'center');
}, 0);
this.select_tree_item(item);
},