fix(customHomePage): fix not expandable glossary term when showing related entities (#14187)

This commit is contained in:
v-tarasevich-blitz-brain 2025-07-23 17:42:03 +03:00 committed by GitHub
parent e3189118c6
commit b91df541b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View File

@ -20,7 +20,7 @@ interface Props {
} }
export default function GlossaryTreeView({ assetUrns, shouldShowRelatedEntities }: Props) { export default function GlossaryTreeView({ assetUrns, shouldShowRelatedEntities }: Props) {
const { tree, loading } = useGlossaryTree(assetUrns ?? []); const { tree, loading } = useGlossaryTree(assetUrns ?? [], shouldShowRelatedEntities);
const { parentValues, addParentValue, removeParentValue } = useParentValuesToLoadChildren(); const { parentValues, addParentValue, removeParentValue } = useParentValuesToLoadChildren();

View File

@ -2,10 +2,14 @@ import useGlossaryNodesAndTermsByUrns from '@app/homeV3/modules/hierarchyViewMod
import useTreeNodesFromGlossaryNodesAndTerms from '@app/homeV3/modules/hierarchyViewModule/components/glossary/hooks/useTreeNodesFromGlossaryNodesAndTerms'; import useTreeNodesFromGlossaryNodesAndTerms from '@app/homeV3/modules/hierarchyViewModule/components/glossary/hooks/useTreeNodesFromGlossaryNodesAndTerms';
import useTree from '@app/homeV3/modules/hierarchyViewModule/treeView/useTree'; 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 { glossaryNodes, glossaryTerms, loading } = useGlossaryNodesAndTermsByUrns(glossaryNodesAndTermsUrns);
const { treeNodes } = useTreeNodesFromGlossaryNodesAndTerms(glossaryNodes, glossaryTerms); const { treeNodes } = useTreeNodesFromGlossaryNodesAndTerms(
glossaryNodes,
glossaryTerms,
shouldShowRelatedEntities,
);
const tree = useTree(treeNodes); const tree = useTree(treeNodes);