Skip to content

Commit

Permalink
[Enhancement #544] Show info about field in which FTS match was found…
Browse files Browse the repository at this point in the history
… (vocabulary results).
  • Loading branch information
ledsoft committed Oct 21, 2024
1 parent 95af546 commit d329dea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/component/search/label/MatchInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const FIELD_NAME_MAPPING = {
prefLabel: "asset.label",
altLabel: "term.metadata.altLabels.label",
hiddenLabel: "term.metadata.hiddenLabels.label",
title: "asset.label",
scopeNote: "term.metadata.comment",
definition: "term.metadata.definition",
description: "description",
Expand Down
7 changes: 4 additions & 3 deletions src/component/search/label/VocabularyResultItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import VocabularyLink from "../../vocabulary/VocabularyLink";
import AssetFactory from "../../../util/AssetFactory";
import VocabularyBadge from "../../badge/VocabularyBadge";
import Constants from "../../../util/Constants";
import MatchInfo from "./MatchInfo";

interface VocabularyResultItemProps {
result: SearchResultItem;
Expand Down Expand Up @@ -55,10 +56,10 @@ const VocabularyResultItem: React.FC<VocabularyResultItemProps> = ({
vocabulary={AssetFactory.createAsset(result) as Vocabulary}
/>
</span>
<br />
<span className="search-result-snippet">
<div className="search-result-snippet">
<FTSMatch match={description} />
</span>
</div>
<MatchInfo result={result} />
</>
);
};
Expand Down

0 comments on commit d329dea

Please sign in to comment.