How to update the multiple objects of array on single click?

Hi i’m making backtesting stimulator and

  1. I have a form to add leg
  2. list of legs (coming from an array of objects)

I have onchange event on each field and each leg can be edited. However, I don’t want to update the individual object of arrayList. I have to update every individual changes on single update button

i am unable to do is after i edit those legs i want to be able to update them all in on click of final update button and not have update for each leg form.

here is the code if you want

Could you check the link again ?

I apologize i did not understand your advice. i need the user to be able to edit each leg that’s why I have onchange event on each leg. However onchange doesn’t update the array and I am unable to figureout how to update all the changed objects with in array all at once.
I made a minimal representation of what I am talking about. may be it should be easy to understand.
https://codesandbox.io/s/green-leftpad-7bhfdc?file=/src/App.js

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.