Я пытаюсь закрыть загрузочную модель в реакции js close после отправки кнопки, но я пытался использовать код jquery, но не смог, поэтому не знаю, как закрыть после отправки кнопки. Поэтому, пожалуйста, помогите мне какзакрыть эту модель после отправки
Это делается в React.js, но мне не удалось
this.state = {
showModal: false
};
handleCloseModal() {
this.setState({ showModal: false });
}
<div
className="modal fade"
id="exampleModal"
tabindex="-1"
role="dialog"
aria-labelledby="exampleModalLabel"
aria-hidden="true"
>
<div className="modal-dialog modal-dialog-centered" role="document">
<div className="modal-content">
<div className="modal-header" style={{ marginTop: "15px" }}>
<h6 className="modal-title" id="rep">
Raport
</h6>
<button
type="button"
className="close"
data-dismiss="modal"
aria-label="Close"
>
<span
aria-hidden="true"
id="cut"
style={{
opacity: "0.7",
fontSize: "30px",
fontWeight: "normal"
}}
>
×
</span>
</button>
</div>
<div className="modal-body ">
<form onSubmit={this.props.loaddata} id="frmStudent">
<Demo />
<button
type="submit"
value="Get Data"
className="btn btn-success active hide"
id="button"
onHide={this.handleCloseModal}
style={{
width: "200px",
background: "rgba(19, 183, 96, 1.0)",
padding: "7px",
marginTop: "15px",
marginBottom: "15px",
fontWeight: "500"
}}
>
Raport
</button>
</center>
</form>
</div>
</div>
</div>
</div>