From e17934c009b65374afd420626e08b424aa5abf36 Mon Sep 17 00:00:00 2001 From: Marcos Martinez Date: Sat, 5 Dec 2020 00:24:35 -0800 Subject: [PATCH] Generate CSV based on input PHS variable values --- phs-gdc-dashboard/src/components/AppContent.js | 6 +++--- phs-gdc-dashboard/src/components/content/Step1.js | 10 +++++++--- phs-gdc-dashboard/src/components/content/Step2.js | 2 +- phs-gdc-dashboard/src/components/content/Step3.js | 10 +++++++--- phs-gdc-dashboard/src/utils/dataCommonsUtils.js | 15 ++++++++++++--- 5 files changed, 30 insertions(+), 13 deletions(-) diff --git a/phs-gdc-dashboard/src/components/AppContent.js b/phs-gdc-dashboard/src/components/AppContent.js index 452543c..1e3dcc0 100644 --- a/phs-gdc-dashboard/src/components/AppContent.js +++ b/phs-gdc-dashboard/src/components/AppContent.js @@ -30,17 +30,17 @@ export default function AppContent() { - + - + - + diff --git a/phs-gdc-dashboard/src/components/content/Step1.js b/phs-gdc-dashboard/src/components/content/Step1.js index 2692b42..0ab827e 100644 --- a/phs-gdc-dashboard/src/components/content/Step1.js +++ b/phs-gdc-dashboard/src/components/content/Step1.js @@ -40,10 +40,14 @@ export default function Step1(props) { }; const handleChangeValuesField = (event) => { + console.log('on change invoked') setValues(event.target.value); if (values != null && values.trim().length > 0) { let valuesArray = values.split(/\r?\n/); - console.log(valuesArray); + props.setPhsVariableValues(valuesArray); + } + else { + props.setPhsVariableValues([]); } }; @@ -52,8 +56,7 @@ export default function Step1(props) { return (

{props.title}

-

Enter or select the variable that you want to use to expand your original data with data from Data - Commons

+

Select the variable that will connect your data to Data Commons data

Variable