mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 01:51:40 -05:00
Pass document to form.reset() to avoid resetting it to pre-submission values
This commit is contained in:
parent
b4ac2d23af
commit
973b2bfce3
1 changed files with 1 additions and 1 deletions
|
@ -635,7 +635,7 @@ class SmartForm extends Component {
|
||||||
// call the clear form method (i.e. trigger setState) only if the form has not been unmounted
|
// call the clear form method (i.e. trigger setState) only if the form has not been unmounted
|
||||||
// (we are in an async callback, everything can happen!)
|
// (we are in an async callback, everything can happen!)
|
||||||
if (typeof this.refs.form !== 'undefined') {
|
if (typeof this.refs.form !== 'undefined') {
|
||||||
this.refs.form.formsyForm.reset();
|
this.refs.form.reset(this.getDocument());
|
||||||
this.clearForm({ clearErrors: true, clearCurrentValues: true, clearDeletedValues: true, document });
|
this.clearForm({ clearErrors: true, clearCurrentValues: true, clearDeletedValues: true, document });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue