Bootstrap Modality Creating Multiple Instances

0

I have a modal bootstrap problem that is creating multiple instances of the same modal .

  

I use the BOOTSTRAP V4 modal using new Javascript . O   that I must do to "destroy" the modal that will be closed and then   reopen it again if you click a certain button?

class SystemControlModal {
    constructor(_modalID){
        this.modalID = _modalID;
    }

    static set ModalElementId(_modalElementID)      {   this.modalElementID = _modalElementID;  }
    static get ModalElementId()                     {   return this.modalElementID;             }

    ShowModal(){
        $('#' + this.modalID).modal('show');
    }

    HideModal(_otherModalID){
        this.otherModalID = _otherModalID;
        $('#' + this.otherModalID).modal('hide');
    }

    HideSucessModal(_sucessModalID){
        this.sucessModalID = _sucessModalID;

        let _timeHIDE = setTimeout(() => { 
            $('#' + this.sucessModalID).modal('hide');
        }, 3000);
    }

}

    
asked by anonymous 06.02.2018 / 16:43

0 answers