diff --git a/src/Analysis/GWASApp/Components/AttritionTableWrapper/AttritionTable/AttritionTable.jsx b/src/Analysis/GWASApp/Components/AttritionTableWrapper/AttritionTable/AttritionTable.jsx
index a77bb59de..2b7fc622a 100644
--- a/src/Analysis/GWASApp/Components/AttritionTableWrapper/AttritionTable/AttritionTable.jsx
+++ b/src/Analysis/GWASApp/Components/AttritionTableWrapper/AttritionTable/AttritionTable.jsx
@@ -10,7 +10,7 @@ const { Panel } = Collapse;
const AttritionTable = ({ selectedCohort, outcome, covariates, tableType }) => {
const [modalInfo, setModalInfo] = useState({
title: 'Historgram',
- isModalOpen: true,
+ isModalOpen: false,
});
const [covariatesProcessed, setCovariatesProcessed] = useState([]);
// Creates an array of arrays such that given input arr [A,B,C]
@@ -99,6 +99,8 @@ const AttritionTable = ({ selectedCohort, outcome, covariates, tableType }) => {
rowType='Cohort'
rowObject={null}
currentCovariateAndCovariatesFromPrecedingRows={[]}
+ modalInfo={modalInfo}
+ setModalInfo={setModalInfo}
/>
)}
@@ -135,6 +137,8 @@ const AttritionTable = ({ selectedCohort, outcome, covariates, tableType }) => {
...item,
applyAutoGenFilters(),
]}
+ modalInfo={modalInfo}
+ setModalInfo={setModalInfo}
/>
))
diff --git a/src/Analysis/GWASApp/Components/AttritionTableWrapper/AttritionTable/AttritionTableModal/AttritionTableModal.css b/src/Analysis/GWASApp/Components/AttritionTableWrapper/AttritionTable/AttritionTableModal/AttritionTableModal.css
new file mode 100644
index 000000000..672566c00
--- /dev/null
+++ b/src/Analysis/GWASApp/Components/AttritionTableWrapper/AttritionTable/AttritionTableModal/AttritionTableModal.css
@@ -0,0 +1,4 @@
+.attrition-table-modal h3 {
+ color: #2e77b8;
+ font-size: 14px;
+}
diff --git a/src/Analysis/GWASApp/Components/AttritionTableWrapper/AttritionTable/AttritionTableModal/AttritionTableModal.jsx b/src/Analysis/GWASApp/Components/AttritionTableWrapper/AttritionTable/AttritionTableModal/AttritionTableModal.jsx
index 9081a863e..49ee58715 100644
--- a/src/Analysis/GWASApp/Components/AttritionTableWrapper/AttritionTable/AttritionTableModal/AttritionTableModal.jsx
+++ b/src/Analysis/GWASApp/Components/AttritionTableWrapper/AttritionTable/AttritionTableModal/AttritionTableModal.jsx
@@ -1,20 +1,20 @@
import React, { useState, useEffect } from 'react';
import PropTypes from 'prop-types';
import { Modal } from 'antd';
+import './AttritionTableModal.css';
-const AttritionTableModal = ({ modalInfo, setModalInfo }) => {
- return (
-
- {modalInfo.title}}
- open={modalInfo.isModalOpen}
- onOk={() => setModalInfo({ ...modalInfo, isModalOpen: false })}
- onCancel={() => setModalInfo({ ...modalInfo, isModalOpen: false })}
- footer={null}
- />
-
- );
-};
+const AttritionTableModal = ({ modalInfo, setModalInfo }) => (
+
+ {modalInfo.title}}
+ open={modalInfo.isModalOpen}
+ onOk={() => setModalInfo({ ...modalInfo, isModalOpen: false })}
+ onCancel={() => setModalInfo({ ...modalInfo, isModalOpen: false })}
+ footer={null}
+ className='attrition-table-modal'
+ />
+
+);
AttritionTableModal.propTypes = {
modalInfo: PropTypes.object,
diff --git a/src/Analysis/GWASApp/Components/AttritionTableWrapper/AttritionTable/AttritionTableRow.jsx b/src/Analysis/GWASApp/Components/AttritionTableWrapper/AttritionTable/AttritionTableRow.jsx
index 845dc7367..51fff0a57 100644
--- a/src/Analysis/GWASApp/Components/AttritionTableWrapper/AttritionTable/AttritionTableRow.jsx
+++ b/src/Analysis/GWASApp/Components/AttritionTableWrapper/AttritionTable/AttritionTableRow.jsx
@@ -133,13 +133,19 @@ const AttritionTableRow = ({
return value;
};
+ const determineModalTitle = () => {
+ let title;
+ rowObject.variable_type === 'concept'
+ ? (title = 'Continuous ')
+ : (title = 'Dichotomous ');
+ title += rowType;
+ rowType === 'Outcome' ? (title += ' Phenotype') : null;
+ return title;
+ };
const handleChatIconClick = () => {
setModalInfo({
...modalInfo,
- title:
- rowType === 'Covariate' || rowType === 'Outcome'
- ? 'Histogram'
- : 'Euler',
+ title: determineModalTitle(),
isModalOpen: true,
});
};
@@ -174,6 +180,8 @@ AttritionTableRow.propTypes = {
outcome: PropTypes.object,
rowObject: PropTypes.object,
selectedCohort: PropTypes.object.isRequired,
+ modalInfo: PropTypes.object.isRequired,
+ setModalInfo: PropTypes.func.isRequired,
};
AttritionTableRow.defaultProps = {
diff --git a/src/Analysis/GWASApp/Components/Covariates/THIS IS WHAT PHENOTYPE HISTOGRAM NEEDS.txt b/src/Analysis/GWASApp/Components/Covariates/THIS IS WHAT PHENOTYPE HISTOGRAM NEEDS.txt
new file mode 100644
index 000000000..09e0a7719
--- /dev/null
+++ b/src/Analysis/GWASApp/Components/Covariates/THIS IS WHAT PHENOTYPE HISTOGRAM NEEDS.txt
@@ -0,0 +1,21 @@
+THIS IS WHAT PHENOTYPE HISTOGRAM NEEDS
+
+
+
+LINE 67
+data-portal/src/Analysis/GWASApp/Components/Covariates/ContinuousCovariates.jsx
+
+
+These values are props from data-portal/src/Analysis/GWASApp/Steps/SelectOutcome/SelectOutcome.jsx
+and available as part of reducer state dispatched obj:
+
+selectedStudyPopulationCohort => YES
+selectedCovariates => probably? Covariates
+outcome => YES
+selectedContinuousItem => hopefully from table row data somewhere?