-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Edit form does not save form after initial save #16
Comments
We've seen this issue from time to time and thought we had it fixed. The issue is that the connection with the scoped variable within the react app gets lost during the update process when react refreshes the props. This needs to be investigated again to see if something has broken again recently and how to fix it. |
I've localized the bug to the implementation of FormEdit.getDerivedStateFromProps. When adding the second field/component to the form this function overwrites this.state.form with this.props.form. |
@7er @randallknutson Can you pls see why am I getting this error |
I'm getting this issue. const onFormioChange = async (submission: any) => {
const formData = new FormData();
formData.append('form_values', JSON.stringify(submission.data))
const updateFormValues = await fetch(`/form/update`, {
method: 'POST',
body: formData
})
}
return <Form
onChange={onFormioChange}
/> this needs to be fixed ASAP!!! |
can i check this? |
@unnatijadhav Absolutely, please do! |
Environment
Hosting type
React app starter kit git commit: 52ae0d4
Formio.js version: [email protected]
Frontend framework: [email protected]
Browser: chrome
Browser version: 81
Steps to Reproduce
Expected behavior
Both fields are still present after reloading page
Observed behavior
Example
Before adding second field (after step 7.)
Add second field and save it (step 8 and 9)
UI and save response
UI and save request body
The text was updated successfully, but these errors were encountered: