Closed rsamanez closed 5 months ago
Only save the last change
If you add a new steps level in many stages, the tool only saves the change made in the last stage
the issue was reported in the next video
It requiere an update in the file: nerdlets/pathpoint-nerdlet/components/Modal/StepsEditor.js
add the lines with the red arrow in the image
and add the next function
CODE:
HandleOnChange = (target, value, id) => { this.setState( state => { const form = { ...state.form }; form[`step_${id}`][target] = value; const stages = this.UpdateSubSteps(value, id); return { form, stages }; }, () => { if (target === 'substeps') { this.ChangeSubsteps(id, value); } } ); if (target === 'level') { this.ChangeOrder(id, value); } }; UpdateSubSteps(value, id) { const current = { ...this.state.current }; const stages = [...this.state.stages]; const stage = stages.find(item => item.id === current.stage); const currentStep = stage.steps.find(item => item.id === id); const array = value.split(','); const sub_steps = []; array.forEach(item => { sub_steps.push({ value: item }); }); currentStep.sub_steps = [...sub_steps]; return stages; }
This issue was fixed on the BUG # 82
Only save the last change
Description
If you add a new steps level in many stages, the tool only saves the change made in the last stage
Steps to Reproduce
the issue was reported in the next video
Solution
It requiere an update in the file: nerdlets/pathpoint-nerdlet/components/Modal/StepsEditor.js
add the lines with the red arrow in the image
and add the next function
CODE:
Relevant Logs / Console output
Your Environment
Additional context