Skip to content

Commit

Permalink
Fix: form data reflection
Browse files Browse the repository at this point in the history
  • Loading branch information
Akalanka47000 committed Oct 14, 2023
1 parent 023696a commit aa8c568
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/identification-form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const IdentificationForm = () => {
};

const onChange = (e, index) => {
const newFormData = [...formData];
const newFormData = JSON.parse(JSON.stringify(formData));
newFormData[index][e.target.name] = e.target.value;
setFormData(newFormData);
};
Expand Down

0 comments on commit aa8c568

Please sign in to comment.