lundi 10 mai 2021

please help me , i want all these checkboxes which is true to be false after firing this event

the checkbox should be false or unchecked automatically after firing this event.

   SubmitCheckBox = (event) => {
        event.preventDefault();
        const data = [];
        this.state.DomesticRegion.map((itm, index) => {
          if (itm.isChecked == true) {
            return data.push(itm.value);
          }
        });
        let domesticArray = [...this.state.domesticArray];
        domesticArray.push(data);
        
    
        this.setState({
          modal: !this.state.modal,
          showCheck: true,
          domesticArray: domesticArray,
        });
      };



Aucun commentaire:

Enregistrer un commentaire