@@ -16,6 +16,7 @@ import { Evidence, MainType } from 'app/shared/api/generated/OncoKbPrivateAPI';
16
16
import Select from 'react-select' ;
17
17
import _ from 'lodash' ;
18
18
import {
19
+ concatElementsByComma ,
19
20
getCancerTypeNameFromOncoTreeType ,
20
21
getDefaultColumnDefinition ,
21
22
getDrugNameFromTreatment ,
@@ -436,10 +437,6 @@ export default class ActionableGenesPage extends React.Component<
436
437
return Promise . resolve ( content . join ( '\n' ) ) ;
437
438
}
438
439
439
- concatElementsByComma ( list : ReactNode [ ] ) {
440
- return list . reduce ( ( prev , curr ) => [ prev , ', ' , curr ] ) ;
441
- }
442
-
443
440
getAlterationCell ( hugoSymbol : string , alterations : string [ ] ) {
444
441
const linkedAlts = alterations . map < React . ReactNode > (
445
442
( alteration , index : number ) => (
@@ -457,7 +454,7 @@ export default class ActionableGenesPage extends React.Component<
457
454
< DefaultTooltip
458
455
overlay = {
459
456
< div style = { { maxWidth : '400px' } } >
460
- { this . concatElementsByComma ( linkedAlts ) }
457
+ { concatElementsByComma ( linkedAlts ) }
461
458
</ div >
462
459
}
463
460
overlayStyle = { {
@@ -478,7 +475,7 @@ export default class ActionableGenesPage extends React.Component<
478
475
</ span >
479
476
) ;
480
477
} else {
481
- return this . concatElementsByComma ( linkedAlts ) ;
478
+ return concatElementsByComma ( linkedAlts ) ;
482
479
}
483
480
}
484
481
@@ -516,6 +513,7 @@ export default class ActionableGenesPage extends React.Component<
516
513
{
517
514
...getDefaultColumnDefinition ( TABLE_COLUMN_KEY . TUMOR_TYPE ) ,
518
515
minWidth : 300 ,
516
+ accessor : 'tumorType' ,
519
517
Cell ( props : { original : Treatment } ) {
520
518
return < span > { props . original . tumorType } </ span > ;
521
519
}
0 commit comments