I have the following modal:
<Modal dialogClassName="clientes-modal" show={this.state.show} className="modal fade">
<Modal.Header className="bg-new">
<h4 ><i className="fa fa-plus"/> Novo Cliente</h4>
<h4 className="x-button" onClick={() => {this.fechar()}}>
<i className="fa fa-times"/>
</h4>
</Modal.Header>
<Modal.Body className="center margin-bottom-15">
<Cadastro/>
</Modal.Body>
</Modal>
What I need is for the <Cadastro/>
component to close this mode when executing a PHP
function, how can I do this?
<Cadastro/>
render(){
return(
<div className="content novo">
<Alerta ref={(ref)=>this.alerta = ref} />
<Form id='testeForm'
action={_P_URL_ + 'cliente/gravar_cadastro'}
erro={erro => this.erro(erro)}>
<h3 className="nova_titulo">Novo</h3>
<hr/>
<Row>
<Input label="*Nome" nome="nome" md="3" />
<InputCpf label="*CPF" id="cpf" nome="cpf" md="3" />
<InputData label="Data de nascimento" nome="nascimento" md="3" />
<Input label="RG" nome="rg" md="3" />
</Row>
<Row>
<InputPhone label="*Telefone" nome="telefone" md="6"/>
<Input label="E-mail" nome="email" md="6" />
</Row>
<h4 className="titulo">Endereço</h4>
<hr/>
<Endereco />
<ButtonSubmitForm><i className="fa fa-check"/> Gravar</ButtonSubmitForm>
</Form>
</div>
)}