When react, clicks somewhere else, how to clear the check box checkbox check box (that is, to initialize the check box)?

1. What I want to implement now is to clear the check box and restore the check box to its original settings when the pop-up box is closed. I used ref to get the dom, of checkbox, but I printed it without the checked attribute, so I couldn"t uncheck it. Here is the code and the component I printed out.

:


ref={check${item.user_id}} checkboxref

ref checked rcCheckbox state checked:


so ask the gods how to force the check box to be unchecked.

Mar.16,2021
Menu