From e3b0cd206b198033653da888db78b56060d87efd Mon Sep 17 00:00:00 2001 From: zaliqarosli Date: Wed, 6 Dec 2023 21:31:24 -0500 Subject: [PATCH] fix jsx console warnings --- jsx/Form.js | 5 ++++- modules/candidate_parameters/jsx/DiagnosisEvolution.js | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/jsx/Form.js b/jsx/Form.js index d8cb485c27a..9c721888dd1 100644 --- a/jsx/Form.js +++ b/jsx/Form.js @@ -233,7 +233,10 @@ export class FieldsetElement extends Component { FieldsetElement.propTypes = { columns: PropTypes.number, name: PropTypes.string, - legend: PropTypes.string, + legend: PropTypes.oneOfType([ + PropTypes.string, + PropTypes.node, + ]), children: PropTypes.node, }; diff --git a/modules/candidate_parameters/jsx/DiagnosisEvolution.js b/modules/candidate_parameters/jsx/DiagnosisEvolution.js index 49dd1adb128..09e1c94e22d 100644 --- a/modules/candidate_parameters/jsx/DiagnosisEvolution.js +++ b/modules/candidate_parameters/jsx/DiagnosisEvolution.js @@ -63,13 +63,13 @@ class DiagnosisEvolution extends Component { let formattedDxEvolution = []; dxEvolution.map((record) => { let formattedDiagnosis = []; - Object.entries(JSON.parse(record.Diagnosis)).map((entry) => { + Object.entries(JSON.parse(record.Diagnosis)).map((entry, index) => { const [fieldName, dx] = entry; - formattedDiagnosis.push(

{fieldName}: {dx}

); + formattedDiagnosis.push(

{fieldName}: {dx}

); }); let sourceFields = []; - record.sourceField.split(',').map((field) => { - sourceFields.push(

{field}

); + record.sourceField.split(',').map((field, index) => { + sourceFields.push(

{field}

); }); const confirmed = record.Confirmed === 'Y' ?