Skip to content

Commit

Permalink
Merge pull request #1011 from zhx828/do-not-show-without-fda-level
Browse files Browse the repository at this point in the history
Updates to actionable genes page
  • Loading branch information
zhx828 authored Aug 10, 2023
2 parents 1b0c70c + 9e227eb commit b3fd0ac
Showing 1 changed file with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -368,12 +368,14 @@ export default class ActionableGenesPage extends React.Component<
@computed
get allFdaTreatments() {
const treatments: Treatment[] = [];
this.allOncokbTreatments.map(treatment => {
treatments.push({
...treatment,
level: treatment.fdaLevel,
} as Treatment);
});
this.allOncokbTreatments
.filter(treatment => treatment.fdaLevel)
.map(treatment => {
treatments.push({
...treatment,
level: treatment.fdaLevel,
} as Treatment);
});
return treatments;
}

Expand Down Expand Up @@ -563,6 +565,11 @@ export default class ActionableGenesPage extends React.Component<
return !!this.collapseStatus[LEVEL_TYPES.FDA];
}

@computed
get oncokbTableKey() {
return this.fdaSectionIsOpen ? 'paginated' : 'non-paginated';
}

@autobind
@action
clearFilters() {
Expand Down Expand Up @@ -847,7 +854,7 @@ export default class ActionableGenesPage extends React.Component<
getTable() {
// We need to render two tables, one with fixed header, one with pagination.
// Once page size is specified in the fixed header table, it cannot be overwritten by the defaultPageSize
return <OncoKBTable {...this.oncokbTableProps} />;
return <OncoKBTable key={this.oncokbTableKey} {...this.oncokbTableProps} />;
}

@computed
Expand Down

0 comments on commit b3fd0ac

Please sign in to comment.