From 582a10c8318eb40ff7279f16a9aa4081ef65cbf7 Mon Sep 17 00:00:00 2001 From: Karan Hotchandani <33024356+karanh37@users.noreply.github.com> Date: Fri, 22 Nov 2024 16:12:47 +0530 Subject: [PATCH] fix minor styling of domain component (#18738) --- .../DomainSelectableList.component.tsx | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/DomainSelectableList/DomainSelectableList.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/DomainSelectableList/DomainSelectableList.component.tsx index 61b3c15f418..aecba1071cf 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/common/DomainSelectableList/DomainSelectableList.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/common/DomainSelectableList/DomainSelectableList.component.tsx @@ -32,12 +32,16 @@ import { getEntityName, getEntityReferenceListFromEntities, } from '../../../utils/EntityUtils'; +import Fqn from '../../../utils/Fqn'; import { getDomainPath } from '../../../utils/RouterUtils'; import { SelectableList } from '../SelectableList/SelectableList.component'; import './domain-select-dropdown.less'; import { DomainSelectableListProps } from './DomainSelectableList.interface'; export const DomainListItemRenderer = (props: EntityReference) => { + const isSubDomain = Fqn.split(props.fullyQualifiedName ?? '').length > 1; + const fqn = `(${props.fullyQualifiedName ?? ''})`; + return (
{ name="folder" width={20} /> - {getEntityName(props)} +
+ {getEntityName(props)} + {isSubDomain && ( + + {fqn} + + )} +
); }; @@ -71,7 +85,7 @@ const DomainSelectableList = ({ return []; }, [selectedDomain]); - const fetchOptions = async (searchText: string) => { + const fetchOptions = async (searchText: string, after?: string) => { if (searchText) { try { const res = await searchData( @@ -97,6 +111,7 @@ const DomainSelectableList = ({ try { const { data, paging } = await getDomainList({ limit: PAGE_SIZE_MEDIUM, + after: after ?? undefined, }); const filterData = getEntityReferenceListFromEntities( data,