From 9e227ebb33e02706406ccfc7db57b37b84d2974c Mon Sep 17 00:00:00 2001
From: Hongxin <5400599+zhx828@users.noreply.github.com>
Date: Tue, 8 Aug 2023 11:25:37 -0400
Subject: [PATCH] Updates to actionable genes page
- Only show treatment with FDA level. If the treatment is Dx/Px, then the fda level is not available
- Add key to actionable genes page. Multiple tables will be rendered if the key is different. This helps to differentiate the paginated vs non-paginated tables. The react-table lib has issue recognizing remove props.
---
.../ActionableGenesPage.tsx | 21 ++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/src/main/webapp/app/pages/actionableGenesPage/ActionableGenesPage.tsx b/src/main/webapp/app/pages/actionableGenesPage/ActionableGenesPage.tsx
index 72c8829f2..d5178f66f 100644
--- a/src/main/webapp/app/pages/actionableGenesPage/ActionableGenesPage.tsx
+++ b/src/main/webapp/app/pages/actionableGenesPage/ActionableGenesPage.tsx
@@ -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;
}
@@ -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() {
@@ -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 ;
+ return ;
}
@computed