diff --git a/src/components/SurveyDocument.js b/src/components/SurveyDocument.js index a12ec10..600e806 100644 --- a/src/components/SurveyDocument.js +++ b/src/components/SurveyDocument.js @@ -227,11 +227,11 @@ function SurveyDocument() { const [selected_qcm_value, setselected_qcm_value] = React.useState(''); const handleChange_qcm = (event) => { - console.log(" event.target.name ", event.target.name); + document.getElementsByName(event.target.name)[0].value = event.target.value; - // setselected_qcm_value(event.target.value); + // setselected_qcm_value(event.target.value); change_survey_data(event.target); }; @@ -263,7 +263,7 @@ function SurveyDocument() { console.log(" ### sortir settab_variable = ", tab_variable); - } + } else { console.log('not checked'); @@ -272,11 +272,7 @@ function SurveyDocument() { } else { - - console.log(" PASSS première action "); - - console.log(" Suppression de ", String(tab[1])); var new_variable = [] for (let i = 0; i < tmp_variable[al].length; i++) { @@ -288,16 +284,15 @@ function SurveyDocument() { tmp_variable[al] = new_variable; - console.log(" tmp_variable ", tmp_variable); + settab_variable(tmp_variable); - console.log(" ### sortir settab_variable = ", tab_variable); + } } - console.log(" ### FINNNNNN settab_variable = ", tab_variable); }; @@ -323,12 +318,28 @@ function SurveyDocument() {