mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-10-13 08:31:59 -05:00
Fix on-click handling of treeview nodes that wasn't refreshing SQL/Dependencies/Dependents in some circumstances. Fixes #3058
This commit is contained in:
1 parent
e0da9c5a0c
commit
6ad44cb51e
3 files changed
+20
-11
No files matched your search
@@ -194,15 +194,19 @@ define('misc.depends', [
|
||||
$msgContainer = $container.find('.pg-panel-depends-message'),
|
||||
$gridContainer = $container.find('.pg-panel-depends-container'),
|
||||
treeHierarchy = node.getTreeNodeHierarchy(item),
|
||||
n_type = type;
|
||||
n_type = type,
|
||||
cache_flag = {
|
||||
node_type: n_type,
|
||||
url: url,
|
||||
};
|
||||
|
||||
// Avoid unnecessary reloads
|
||||
if (_.isEqual($(panel[0]).data('node-prop'), treeHierarchy)) {
|
||||
if (_.isEqual($(panel[0]).data('node-prop'), cache_flag)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Cache the current IDs for next time
|
||||
$(panel[0]).data('node-prop', treeHierarchy);
|
||||
$(panel[0]).data('node-prop', cache_flag);
|
||||
|
||||
// Hide the grid container and show the default message container
|
||||
if (!$gridContainer.hasClass('hidden'))
|
||||
@@ -381,4 +385,4 @@ define('misc.depends', [
|
||||
});
|
||||
|
||||
return pgBrowser.ShowNodeDepends;
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user