dimanche 9 mai 2021

i wanted all checkboxes should be unchecked after submmiting form and for another form it should be unchecked react

This event is used to get only check values. how can I uncheck all checkboxes after firing this event?

okShippingTemplate = (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