From 5a8be4b2e79b1def1831301e73dab5b0ba3b95b9 Mon Sep 17 00:00:00 2001 From: Ashish Gupta Date: Sat, 22 Mar 2025 14:00:43 +0530 Subject: [PATCH] MINOR: fix the display not render in lineage drawer (#20381) * fix the display not render in lineage drawer * minor optimization --- .../EntityHeaderTitle.component.tsx | 19 +++++++++++++++++-- .../EntityHeaderTitle.interface.ts | 1 + .../EntityInfoDrawer.component.tsx | 1 + 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityHeaderTitle/EntityHeaderTitle.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityHeaderTitle/EntityHeaderTitle.component.tsx index 9038a6bbcfe..260333945d2 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityHeaderTitle/EntityHeaderTitle.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityHeaderTitle/EntityHeaderTitle.component.tsx @@ -23,6 +23,7 @@ import { ReactComponent as StarFilledIcon } from '../../../assets/svg/ic-star-fi import { ROUTES } from '../../../constants/constants'; import { useClipboard } from '../../../hooks/useClipBoard'; import useCustomLocation from '../../../hooks/useCustomLocation/useCustomLocation'; +import { getEntityName } from '../../../utils/EntityUtils'; import { stringToHTML } from '../../../utils/StringsUtils'; import CertificationTag from '../../common/CertificationTag/CertificationTag'; import './entity-header-title.less'; @@ -40,6 +41,7 @@ const EntityHeaderTitle = ({ isDisabled, className, showName = true, + showOnlyDisplayName = false, certification, excludeEntityService, isFollowing, @@ -66,6 +68,19 @@ const EntityHeaderTitle = ({ [location.pathname] ); + const entityName = useMemo( + () => + stringToHTML( + showOnlyDisplayName + ? getEntityName({ + displayName, + name, + }) + : name + ), + [showOnlyDisplayName, displayName, name] + ); + const content = ( - + - {stringToHTML(name)} + {entityName} {openEntityInNewPage && (