Tuesday 26 October 2021

Creating dynamic checkboxs for each row using react js

I've rows with two inputs in a form when clicked on add, it will add new row. So, from the second row, on clicking add it should add checkbox 1 to show that the second row is dependent on first and for the third row it should create 2 checkboxes saying checkbox 1 checkbox 2.When the save button is clicked it should be saved with its rows inputs corresponding checkbox clicked.

I'm able to create dynamic checkboxes for each row but unable to send value selected checkbox value for each row. The e.target.value is showing as 1 ,2,3, when I click the check box but its not appending to the "dependent" as "dependent":"1,2,3"

https://codesandbox.io/s/practical-stallman-msr7n?file=/src/App.js



from Creating dynamic checkboxs for each row using react js

No comments:

Post a Comment