Fixes an issue where the connect server/database menu was not updated correctly. Fixes #7186

This commit is contained in:
Nikhil Mohite
2022-03-07 15:28:28 +05:30
committed by Akshay Joshi
parent 24c0816042
commit 1b7dce124b
3 changed files with 9 additions and 0 deletions

View File

@@ -477,6 +477,9 @@ define('pgadmin.node.database', [
pgBrowser.Events.trigger(
'pgadmin:database:connected', _item, _data
);
/* Call enable/disable menu function after database is connected.
To make sure all the menus for database is in the right state */
pgBrowser.enable_disable_menus.apply(pgBrowser, [_item]);
if (!_connected) {
setTimeout(function() {

View File

@@ -930,6 +930,11 @@ define('pgadmin.node.server', [
// Load dashboard
pgBrowser.Events.trigger('pgadmin-browser:tree:selected', _item, _data, node);
/* Call enable/disable menu function after database is connected.
To make sure all the menus for database is in the right state */
pgBrowser.enable_disable_menus.apply(pgBrowser, [_item]);
// We're not reconnecting
if (!_wasConnected) {
_tree.setInode(_item);