diff --git a/datahub-web-react/src/app/homeV3/modules/hierarchyViewModule/components/glossary/GlossaryTreeView.tsx b/datahub-web-react/src/app/homeV3/modules/hierarchyViewModule/components/glossary/GlossaryTreeView.tsx index 8e5dde01b1..70193be76b 100644 --- a/datahub-web-react/src/app/homeV3/modules/hierarchyViewModule/components/glossary/GlossaryTreeView.tsx +++ b/datahub-web-react/src/app/homeV3/modules/hierarchyViewModule/components/glossary/GlossaryTreeView.tsx @@ -20,7 +20,7 @@ interface Props { } export default function GlossaryTreeView({ assetUrns, shouldShowRelatedEntities }: Props) { - const { tree, loading } = useGlossaryTree(assetUrns ?? []); + const { tree, loading } = useGlossaryTree(assetUrns ?? [], shouldShowRelatedEntities); const { parentValues, addParentValue, removeParentValue } = useParentValuesToLoadChildren(); diff --git a/datahub-web-react/src/app/homeV3/modules/hierarchyViewModule/components/glossary/hooks/useGlossaryTree.ts b/datahub-web-react/src/app/homeV3/modules/hierarchyViewModule/components/glossary/hooks/useGlossaryTree.ts index 5f2113cfd2..93add7510c 100644 --- a/datahub-web-react/src/app/homeV3/modules/hierarchyViewModule/components/glossary/hooks/useGlossaryTree.ts +++ b/datahub-web-react/src/app/homeV3/modules/hierarchyViewModule/components/glossary/hooks/useGlossaryTree.ts @@ -2,10 +2,14 @@ import useGlossaryNodesAndTermsByUrns from '@app/homeV3/modules/hierarchyViewMod import useTreeNodesFromGlossaryNodesAndTerms from '@app/homeV3/modules/hierarchyViewModule/components/glossary/hooks/useTreeNodesFromGlossaryNodesAndTerms'; import useTree from '@app/homeV3/modules/hierarchyViewModule/treeView/useTree'; -export default function useGlossaryTree(glossaryNodesAndTermsUrns: string[]) { +export default function useGlossaryTree(glossaryNodesAndTermsUrns: string[], shouldShowRelatedEntities: boolean) { const { glossaryNodes, glossaryTerms, loading } = useGlossaryNodesAndTermsByUrns(glossaryNodesAndTermsUrns); - const { treeNodes } = useTreeNodesFromGlossaryNodesAndTerms(glossaryNodes, glossaryTerms); + const { treeNodes } = useTreeNodesFromGlossaryNodesAndTerms( + glossaryNodes, + glossaryTerms, + shouldShowRelatedEntities, + ); const tree = useTree(treeNodes);