0 ? (
{synonyms.map((synonym) => (
- <>
- {synonym}
- >
+
))}
) : (
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/facetfilter/facetFilter.constants.ts b/openmetadata-ui/src/main/resources/ui/src/components/common/facetfilter/facetFilter.constants.ts
index 1bd7b5d8e18..865a3f92b78 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/common/facetfilter/facetFilter.constants.ts
+++ b/openmetadata-ui/src/main/resources/ui/src/components/common/facetfilter/facetFilter.constants.ts
@@ -22,7 +22,7 @@ const aggregationKeyToTitleMap: Record = {
'service.name.keyword': 'Service Name',
entityType: 'Entity Type',
'messageSchema.schemaFields.name': 'Schema Fields',
- 'glossary.name': 'Glossary',
+ 'glossary.name.keyword': 'Glossary',
};
const aggregationKeyOrdering: Record = {
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/searched-data/SearchedData.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/searched-data/SearchedData.test.tsx
index 1dae306c772..feb5db9e106 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/searched-data/SearchedData.test.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/searched-data/SearchedData.test.tsx
@@ -44,6 +44,10 @@ const mockData: SearchedDataProps['data'] = [
tagFQN: 'tier1',
},
},
+ highlight: {
+ name: ['raw_customer'],
+ displayName: ['raw_customer'],
+ },
},
{
_index: SearchIndex.TABLE,
@@ -132,6 +136,27 @@ describe('Test SearchedData Component', () => {
expect(searchedDataContainer).toHaveLength(3);
});
+ it('Should display table card with name and display name highlighted', () => {
+ const { container } = render(, {
+ wrapper: MemoryRouter,
+ });
+
+ const searchedDataContainer = getAllByTestId(container, 'table-data-card');
+
+ expect(searchedDataContainer).toHaveLength(3);
+
+ const headerName = getAllByTestId(container, 'entity-header-name');
+ const headerDisplayName = getAllByTestId(
+ container,
+ 'entity-header-display-name'
+ );
+
+ expect(headerName[0].querySelector('span')).toHaveClass('text-highlighter');
+ expect(headerDisplayName[0].querySelector('span')).toHaveClass(
+ 'text-highlighter'
+ );
+ });
+
it('If children is provided it should display', () => {
const { container } = render(
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/searched-data/SearchedData.tsx b/openmetadata-ui/src/main/resources/ui/src/components/searched-data/SearchedData.tsx
index aa8f3ccab14..7a24e4eb120 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/searched-data/SearchedData.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/searched-data/SearchedData.tsx
@@ -64,9 +64,11 @@ const SearchedData: React.FC = ({
});
}
- let name = getEntityName(table);
+ let name = table.name;
+ let displayName = getEntityName(table);
if (!isUndefined(highlight)) {
name = highlight?.name?.join(' ') || name;
+ displayName = highlight?.displayName?.join(' ') || displayName;
}
const matches = highlight
@@ -101,7 +103,7 @@ const SearchedData: React.FC = ({
handleSummaryPanelDisplay={handleSummaryPanelDisplay}
id={`tabledatacard${index}`}
matches={matches}
- source={{ ...table, name, description: tDesc }}
+ source={{ ...table, name, description: tDesc, displayName }}
/>
);