-
Notifications
You must be signed in to change notification settings - Fork 434
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
Skip Form validating at first render #277
base: master
Are you sure you want to change the base?
Conversation
Hi I personally tried your fix. For my use case it missed one extra check in the attachToForm method. This method is also calling this.validate for each component that gets attached to the form => Validation at first render. |
@tanneess Thanks for your feedback, I added the missing check in attachToForm method. Per the article in README.md (http://christianalfoni.github.io/javascript/2014/10/22/nailing-that-validation-with-reactjs.html) I assume the |
any thoughts from maintainers? is something missing for the PR? |
I could do with this being merged - I'm loading lots of data into my forms and validating it means the form is "changed" which it obviously isn't. |
👍 for adding the functionality enabled by this PR. |
@Semigradsky Is there any reason this have not been merged? Let me know if I can help out in any way. |
This is also a good PR for performance issues. Loading in 125 rows with 5 Selects in each rows causes validation to happen constantly and you have to wait 20 seconds till the form becomes available. This PR works fine for the most part but I get errors stating to remove the prop from the form tag. The render method needs to be updated to include the prop in nonFormsyProps and in the list above. To round off performance issues, ideally validation needs disabling when the component is unmounted as well as it tries to validate at this point also. For now I have added a simple check for this to set a validation = false in componentWillUnmount and a check at the top of validate form against it. |
is there any update on this ? |
This is to fix issue #254