Skip to content

Commit

Permalink
Merge pull request #151 from bento-platform/features/ichange-p-numbers
Browse files Browse the repository at this point in the history
Add extra patient ids
  • Loading branch information
brouillette authored Apr 25, 2022
2 parents 0cceff3 + a78c3a8 commit 1298ae0
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/components/explorer/ExplorerDatasetSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 <><Link to={location => ({
pathname: withBasePath(`data/explorer/individuals/${individual.id}/overview`),
state: {backUrl: location.pathname},
})}>{individual.id}</Link> {listRender}</>;
};

const SEARCH_RESULT_COLUMNS = [
{
title: "Individual",
dataIndex: "individual",
render: individual => <Link to={location => ({
pathname: withBasePath(`data/explorer/individuals/${individual.id}/overview`),
state: {backUrl: location.pathname},
})}>{individual.id}</Link>,
render: individual => individualRender(individual),
sorter: (a, b) => a.individual.id.localeCompare(b.individual.id),
defaultSortOrder: "ascend",
},
Expand Down

0 comments on commit 1298ae0

Please sign in to comment.