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