@@ -2,11 +2,12 @@ import { observer } from 'mobx-react';
22import * as React from 'react' ;
33import { computed } from 'mobx' ;
44import ReactSelect from 'react-select1' ;
5+ import InfoIcon from '../InfoIcon' ;
56
67export interface ICohortSelector {
78 study : string ;
8- cancerType : string ;
9- cancerTypeDetailed : string ;
9+ cancerTypes : string [ ] ;
10+ cancerTypesDetailed : string [ ] ;
1011 cohortSelection : CohortOptions ;
1112 handleCohortChange : ( cohort : {
1213 value : CohortOptions ;
@@ -36,11 +37,13 @@ export default class CohortSelector extends React.Component<
3637 } ,
3738 {
3839 value : CohortOptions . CancerType ,
39- label : `Samples with: ${ this . props . cancerType } ` ,
40+ label : `Samples with: ${ this . props . cancerTypes . join ( ', ' ) } ` ,
4041 } ,
4142 {
4243 value : CohortOptions . CancerTypeDetailed ,
43- label : `Samples with: ${ this . props . cancerTypeDetailed } ` ,
44+ label : `Samples with: ${ this . props . cancerTypesDetailed . join (
45+ ', '
46+ ) } `,
4447 } ,
4548 ] ;
4649 }
@@ -49,15 +52,28 @@ export default class CohortSelector extends React.Component<
4952 return (
5053 < div style = { { marginBottom : 10 } } >
5154 < div className = "form-group" >
52- < label > Relevant Cohort</ label >
53- < div className = "cohort-select-div" >
55+ < label > Reference Cohort</ label >
56+ < div
57+ className = "cohort-select-div"
58+ style = { { display : 'flex' , alignItems : 'center' } }
59+ >
5460 < ReactSelect
5561 name = "cohort-select"
5662 value = { this . props . cohortSelection }
5763 onChange = { this . props . handleCohortChange }
5864 options = { this . cohortOptions }
5965 clearable = { false }
6066 />
67+ < InfoIcon
68+ tooltip = {
69+ < span >
70+ Set of patients/samples displayed alongside
71+ the current patient/sample for context
72+ </ span >
73+ }
74+ tooltipPlacement = "right"
75+ style = { { marginLeft : 7 } }
76+ />
6177 </ div >
6278 </ div >
6379 </ div >
0 commit comments