Skip to content

Commit

Permalink
Use keepDirtyOnReinitialize flag for current form initialization.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dragomir-Ivanov committed Dec 21, 2019
1 parent b272cbe commit 416bbeb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ReactFinalForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,16 +140,16 @@ function ReactFinalForm<FormValues: FormValuesShape>({
useWhenValueChanges(destroyOnUnregister, () => {
form.destroyOnUnregister = !!destroyOnUnregister
})
useWhenValueChanges(keepDirtyOnReinitialize, () => {
form.setConfig('keepDirtyOnReinitialize', keepDirtyOnReinitialize)
})
useWhenValueChanges(
initialValues,
() => {
form.setConfig('initialValues', initialValues)
},
initialValuesEqual || shallowEqual
)
useWhenValueChanges(keepDirtyOnReinitialize, () => {
form.setConfig('keepDirtyOnReinitialize', keepDirtyOnReinitialize)
})
useWhenValueChanges(mutators, () => {
form.setConfig('mutators', mutators)
})
Expand Down

0 comments on commit 416bbeb

Please # to comment.