Skip to content
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

Fix error occur when use SimpleForm with ArrayInput #3884

Merged
merged 2 commits into from Oct 29, 2019
Merged

Fix error occur when use SimpleForm with ArrayInput #3884

merged 2 commits into from Oct 29, 2019

Conversation

ghost
Copy link

@ghost ghost commented Oct 26, 2019

The issue:
Now destroyOnUnregister configuration of react-final-form has problem.
If set destroyOnUnregister to true on Form component of react-final-form, the following problems arise.

error

Of course I can use it wrapped, but I modified it myself cuz I wanted to use SimpleForm that the react-admin provides as it is.

The fixed:
Remove destroyOnUnregister configuration on SimpleForm.

success

please check and accept my pull request. :)

destroyOnUnregister of react-final-form's config setting has error, so removed it
@tdeo
Copy link
Contributor

tdeo commented Oct 28, 2019

I was running into something similar inside a TabbedForm, should the same be done there ?

@ghost
Copy link
Author

ghost commented Oct 28, 2019

@tdeo yes right.
I checked again to whole project after looked at your comment.
As a result, they were used in SimpleForm and TabbedForm...
I just removed destroyOnUnregister on TabbedForm and push.

If you want to use TabbedForm or SimpleForm with ArrayInput right now, you can use it as follows until it is updated.

<SimpleForm destroyOnUnregister={false}></SimpleForm>

or

<TabbedForm destroyOnUnregister={false}></TabbedForm>

thanks for your comment!

Copy link
Collaborator

@djhi djhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I added this prop when I was working on dynamic forms. Let's remove it for the default as it's possible to add it when needed.

Thanks!

@djhi djhi added this to the 3.0.0 milestone Oct 28, 2019
@fzaninotto fzaninotto merged commit 66d8dd1 into marmelab:next Oct 29, 2019
@fzaninotto
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants