jeudi 31 décembre 2020

Disable and Deselect Checkboxes by name in React

I have multiple checkboxes, But the condition is to disable the checkbox on specific name check. I have achieved that, but the problem is when you check on other checkboxes first and then check on the checkbox which you want to disable, the checkbox check is still present. I have published the code on stackblitz if you want to take a look. So on the below code, i want to disable all checkbox on click of "All ages". But when you select other checkbox and then select "All ages" checkbox the checked is still present and you can deselect that checkbox. How can i remove that checkbox checked after disabling.

StackBlitz




Aucun commentaire:

Enregistrer un commentaire