jeudi 28 mai 2020

add and get selected checkbox in modal

Hi everyone I'm working with Angular, and Bootstrap 4.

1.- I have the following modal and I would like to add the information dynamically, add some already selected checkboxes and others not, depending on the configuration, for now I am filling it with an array of objects, but I would like to know what I would have to do to fill it with some selected check and others not.

Modal

2.- In the Modal I can select or deselect the checkboxes and when I give Save changes I get the id of the checkboxes that were modified, both selected and deselected.

My ckecbox already have a value to identify them, I just don't know how to get all the modified checks

Value of checkbox

I share the project to support me to guide me how I could solve these problems that I have:

https://codesandbox.io/checkbox

Thank you for your support.




Aucun commentaire:

Enregistrer un commentaire