mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-09 23:15:58 -06:00
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:
parent
3841bc5253
commit
9c61670c9f
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user