Skip to content

Commit

Permalink
doc for undefined tuple
Browse files Browse the repository at this point in the history
  • Loading branch information
juanNH committed Oct 16, 2024
1 parent f1ae78c commit 2157df6
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ interface ClinicalSourceState {
cgdsStudyName: Nullable<string>,
/** Alert interface */
alert: CustomAlert,
/** Posibles values for survival tuple */
/** Posibles values for survival tuple, undefined prevents rendering an empty Select for CGDS Datasets or user Datasets */
survivalTuplesPossiblesValues: string[] | undefined,
}

Expand Down Expand Up @@ -137,7 +137,9 @@ export class ClinicalSourcePopup extends React.Component<PopupClinicalSourceProp
clinicalSource.selectedExistingFile = null
clinicalSource.CGDSStudy = null
cleanRef(clinicalSource.newUploadedFileRef)
// Clean survival columns
const survivalColumns = []
// Clean possibles values
const survivalTuplesPossiblesValues = []
this.setState({ clinicalSource, survivalColumns, survivalTuplesPossiblesValues }, this.updateSourceFilenames)
}
Expand Down Expand Up @@ -240,6 +242,7 @@ export class ClinicalSourcePopup extends React.Component<PopupClinicalSourceProp
clinicalSource.type = SourceType.UPLOADED_DATASETS
clinicalSource.selectedExistingFile = selectedFile
const survivalColumns = selectedFile.survival_columns || []
// set undefined to set values for tuple
const survivalTuplesPossiblesValues = undefined
this.setState({ clinicalSource, survivalColumns, survivalTuplesPossiblesValues }, this.updateSourceFilenames)
} else {
Expand Down

0 comments on commit 2157df6

Please sign in to comment.