availity-reactstrap-validation
availity-reactstrap-validation copied to clipboard
how to refresh input value after a ValideSubmit has changed props ?
Hi !
First of all thanks for this very useful package !
Following question may be trivial.
render() {
const { loading, user } = this.props;
return !loading ? (
<AvForm className="ProfilePassword" onValidSubmit={this.handleValidSubmit} model={user} >
<Row>
<Col xs="6">
<AvGroup>
<Label for="firstName">Prénom</Label>
<AvInput type="text" name="profile.name.first" id="firstName" required />
<AvFeedback>Quel est votre prénom ?</AvFeedback>
</AvGroup>
</Col>
<Col xs="6">
<AvGroup>
<Label for="lastName">Nom</Label>
<AvInput type="text" name="profile.name.last" id="lastName" required />
<AvFeedback>Quel est votre nom ?</AvFeedback>
</AvGroup>
</Col>
</Row>
....
On server side, firstName & lastName get automatically capitalized when submitted. My props get updated but content of input is not.
Am I missing something ?
i've tried #29 suggestion :
componentWillReceiveProps() {
this.form.reset();
}
...
<AvForm className="ProfilePassword" onValidSubmit={this.handleValidSubmit} model={user} innerRef={(c) => { this.form = c; }} >
...
But it still doesn't work :(
Thank you for your help !
hey @liitfr , did you find the solution. i am facing the same problem and not able to solve it