mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
[Forms] Add currentDocument to clearForm
allows for the form fields to be correctly cleared when calling clearForm with `clearCurrentValues == true`
This commit is contained in:
parent
9d53c33727
commit
06607e5e9a
1 changed files with 1 additions and 0 deletions
|
@ -705,6 +705,7 @@ class SmartForm extends Component {
|
|||
this.setState(prevState => ({
|
||||
errors: clearErrors ? [] : prevState.errors,
|
||||
currentValues: clearCurrentValues ? {} : prevState.currentValues,
|
||||
currentDocument: clearCurrentValues ? {} : prevState.currentDocument,
|
||||
deletedValues: clearDeletedValues ? [] : prevState.deletedValues,
|
||||
initialDocument: document && !clearCurrentValues ? document : prevState.initialDocument,
|
||||
disabled: false,
|
||||
|
|
Loading…
Add table
Reference in a new issue