From b91df541b2bdf1b5f82de9d56ab2a75cf81e320e Mon Sep 17 00:00:00 2001 From: v-tarasevich-blitz-brain Date: Wed, 23 Jul 2025 17:42:03 +0300 Subject: [PATCH] fix(customHomePage): fix not expandable glossary term when showing related entities (#14187) --- .../components/glossary/GlossaryTreeView.tsx | 2 +- .../components/glossary/hooks/useGlossaryTree.ts | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) 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);