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 61b3c15f4185..aecba1071cf3 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,