|
1 | 1 | import React, { MouseEvent } from 'react';
|
2 | 2 | import { Select } from 'antd';
|
3 | 3 | import { CloseCircleFilled } from '@ant-design/icons';
|
| 4 | +import styled from 'styled-components'; |
4 | 5 | import { Domain, EntityType } from '../../../../types.generated';
|
5 | 6 | import { useEntityRegistry } from '../../../useEntityRegistry';
|
6 | 7 | import ClickOutside from '../../../shared/ClickOutside';
|
7 | 8 | import { BrowserWrapper } from '../../../shared/tags/AddTagsTermsModal';
|
8 | 9 | import useParentSelector from './useParentSelector';
|
9 | 10 | import DomainNavigator from '../../../domain/nestedDomains/domainNavigator/DomainNavigator';
|
10 | 11 | import { useDomainsContext } from '../../../domain/DomainsContext';
|
| 12 | +import ParentEntities from '../../../search/filters/ParentEntities'; |
| 13 | +import { getParentDomains } from '../../../domain/utils'; |
| 14 | + |
| 15 | +const SearchResultContainer = styled.div` |
| 16 | + display: flex; |
| 17 | + flex-direction: column; |
| 18 | + justify-content: center; |
| 19 | +`; |
11 | 20 |
|
12 | 21 | // filter out entity itself and its children
|
13 | 22 | export function filterResultsForMove(entity: Domain, entityUrn: string) {
|
@@ -81,7 +90,10 @@ export default function DomainParentSelect({ selectedParentUrn, setSelectedParen
|
81 | 90 | >
|
82 | 91 | {domainSearchResultsFiltered.map((result) => (
|
83 | 92 | <Select.Option key={result?.entity?.urn} value={result.entity.urn}>
|
84 |
| - {entityRegistry.getDisplayName(result.entity.type, result.entity)} |
| 93 | + <SearchResultContainer> |
| 94 | + <ParentEntities parentEntities={getParentDomains(result.entity, entityRegistry)} /> |
| 95 | + {entityRegistry.getDisplayName(result.entity.type, result.entity)} |
| 96 | + </SearchResultContainer> |
85 | 97 | </Select.Option>
|
86 | 98 | ))}
|
87 | 99 | </Select>
|
|
0 commit comments