Skip to content

Commit

Permalink
Merge bafccdf into ea84007
Browse files Browse the repository at this point in the history
  • Loading branch information
dstaley committed Oct 4, 2022
2 parents ea84007 + bafccdf commit 23dc3ab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/polite-gifts-smell.md
@@ -0,0 +1,5 @@
---
'@hashicorp/react-marketo-form': patch
---

Correctly keep modified values when recalculating initial state
2 changes: 1 addition & 1 deletion packages/marketo-form/form/index.tsx
Expand Up @@ -181,7 +181,7 @@ const Form = ({
useEffect(() => {
if (hasBeenRendered.current) {
methods.reset(calculateDefaultValues(marketoForm.result, initialValues), {
keepDirtyValues: true,
keepValues: true,
})
}
}, [hasBeenRendered, methods, marketoForm, initialValues])
Expand Down

0 comments on commit 23dc3ab

Please sign in to comment.