diff --git a/src/components/explorer/ExplorerDatasetSearch.js b/src/components/explorer/ExplorerDatasetSearch.js index 44c42ece9..67e570eac 100644 --- a/src/components/explorer/ExplorerDatasetSearch.js +++ b/src/components/explorer/ExplorerDatasetSearch.js @@ -23,14 +23,21 @@ import { import {withBasePath} from "../../utils/url"; import SearchTracksModal from "./SearchTracksModal"; + +const individualRender = (individual) => { + const alternateIds = individual.alternate_ids ?? []; + const listRender = alternateIds.length ? " (" + alternateIds.join(", ") + ")" : ""; + return <> ({ + pathname: withBasePath(`data/explorer/individuals/${individual.id}/overview`), + state: {backUrl: location.pathname}, + })}>{individual.id} {listRender}; +}; + const SEARCH_RESULT_COLUMNS = [ { title: "Individual", dataIndex: "individual", - render: individual => ({ - pathname: withBasePath(`data/explorer/individuals/${individual.id}/overview`), - state: {backUrl: location.pathname}, - })}>{individual.id}, + render: individual => individualRender(individual), sorter: (a, b) => a.individual.id.localeCompare(b.individual.id), defaultSortOrder: "ascend", },