mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fix an issue where type column in dependents/dependencies tab is not showing correct label. #7225
This commit is contained in:
@@ -88,6 +88,9 @@ function Dependents({ nodeData, nodeItem, node, treeNodeInfo, isActive, isStale,
|
||||
sortable: true,
|
||||
resizable: true,
|
||||
disableGlobalFilter: false,
|
||||
Cell: ({row})=>{
|
||||
return pgAdmin.Browser.Nodes?.[row.original.type]?.label??row.original.type;
|
||||
}
|
||||
},
|
||||
{
|
||||
Header: 'Name',
|
||||
|
||||
@@ -193,7 +193,7 @@ export default function CollectionNodeProperties({
|
||||
};
|
||||
|
||||
React.useEffect(() => {
|
||||
if (node){
|
||||
if (node) {
|
||||
|
||||
let nodeObj =
|
||||
pgAdmin.Browser.Nodes[nodeData?._type.replace('coll-', '')];
|
||||
@@ -204,6 +204,10 @@ export default function CollectionNodeProperties({
|
||||
|
||||
let tableColumns = [];
|
||||
let column = {};
|
||||
if(!isStale || !isActive) {
|
||||
return;
|
||||
}
|
||||
|
||||
setLoaderText(gettext('Loading...'));
|
||||
|
||||
if (nodeData._type.indexOf('coll-') > -1 && !_.isUndefined(nodeObj.getSchema)) {
|
||||
@@ -250,9 +254,6 @@ export default function CollectionNodeProperties({
|
||||
});
|
||||
}
|
||||
|
||||
if(!isStale || !isActive) {
|
||||
return;
|
||||
}
|
||||
|
||||
api({
|
||||
url: url,
|
||||
@@ -275,7 +276,7 @@ export default function CollectionNodeProperties({
|
||||
});
|
||||
setIsStale(false);
|
||||
}
|
||||
}, [nodeData, node, nodeItem, isStale]);
|
||||
}, [nodeData, node, nodeItem, isStale, isActive]);
|
||||
|
||||
const CustomHeader = () => {
|
||||
const canDrop = evalFunc(node, node.canDrop, nodeData, nodeItem, treeNodeInfo);
|
||||
|
||||
Reference in New Issue
Block a user