Skip to content

Commit

Permalink
Show add button when only clinical event data present
Browse files Browse the repository at this point in the history
  • Loading branch information
kalletlak committed Oct 16, 2024
1 parent 1930cd6 commit c2eaf0f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/pages/groupComparison/Survival.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,18 @@ export default class Survival extends React.Component<ISurvivalProps, {}> {
this.pageStore.analysisGroupsComputations,
this.pageStore.survivalPrefixes,
this.pageStore.survivalPrefixTableDataStore,
this.props.store.clinicalEventOptions,
],
render: () => {
const analysisGroups = this.pageStore.analysisGroupsComputations
.result!.analysisGroups;
const survivalTitleByPrefix = this.pageStore.survivalTitleByPrefix
.result!;

if (Object.keys(survivalTitleByPrefix).length > 1) {
if (
Object.keys(survivalTitleByPrefix).length > 1 ||
!_.isEmpty(this.props.store.clinicalEventOptions.result)
) {
// only show table if there's more than one prefix option
return (
<SurvivalPrefixTable
Expand Down
2 changes: 1 addition & 1 deletion src/shared/lib/comparison/ComparisonStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2095,7 +2095,7 @@ export default abstract class ComparisonStore extends AnalysisStore
(this.predefinedSurvivalClinicalDataExists.isComplete &&
this.clinicalEventOptions.isComplete &&
this.predefinedSurvivalClinicalDataExists.result) ||
!_.isEmpty(this.clinicalEventOptions.result!)
!_.isEmpty(this.clinicalEventOptions.result)
);
}

Expand Down

0 comments on commit c2eaf0f

Please sign in to comment.