Closed anjalikalsariya closed 9 months ago
Hello @anjalikalsariya,
I am sorry, I do not understand what is the issue.
Could you please explain it more?
Thanks 😊
@anjalikalsariya I think its because the CustomFormTemplate
is defined inside the component that manages the state and is "recreated" anytime the parent component re-renders
. Either extract the form template outside of the component or memoize it. That should solve the issue.
Thanks @Hyperkid123
You are right. Let me try that.
If you choose to separate the template, you will have to send custom props to it. Its better to use the child component template for that purpose. You may end up with a similar issue if you modify the FormTemplate prop with an anonymous function. Here is an example:
https://www.data-driven-forms.org/components/children#childrennodeminimalexample
Thank you so much @Hyperkid123 .
My issue is fixed by your solution https://www.data-driven-forms.org/components/children#childrennodeminimalexample
Hello @anjalikalsariya,
I am sorry, I do not understand what is the issue.
Could you please explain it more?
Thanks 😊
@rvsia That was a reload form issue during every change input. That is fixed now.
Here is code: