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

Use low priority validation for FieldArray #2707

Closed

Conversation

mhiley
Copy link

@mhiley mhiley commented Aug 17, 2020

We've been experiencing issues with laggy text input fields in our application, specifically when using FieldArray, even on forms with a small number of fields (less than 10). Using FastField has been an acceptable workaround in certain cases but has its own drawbacks, so I tried out the suggestion in #2542 in our application and confirmed that using low priority validation does fix our performance issues (or is at least a very significant improvement).

I don't believe this change affects the current API at all - it just exposes validateFormWithLowPriority so that it can be used in place of validateForm (alias of validateFormWithHighPriority) in FieldArray. This appears to be working well in our application and I can't see any obvious drawbacks, but let me know if there are any issues with running the validation with low priority here.

Thanks for taking a look!

@mhiley mhiley changed the title Field array low priority validation Use low priority validation for FieldArray Aug 17, 2020
@changeset-bot
Copy link

changeset-bot bot commented Oct 26, 2020

⚠️ No Changeset found

Latest commit: 1c5cdf8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Oct 26, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/formium/formik/9zse0b3iz
✅ Preview: https://formik-git-field-array-low-priority-validation.formium.now.sh

@mhiley
Copy link
Author

mhiley commented Oct 26, 2020

Thanks @pietmichal - btw, we've been running this change as a patch in our application for about two weeks now and it's been working well so far.

Copy link
Owner

@jaredpalmer jaredpalmer left a comment

Choose a reason for hiding this comment

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

Can you rename the prop to unstable_validateFormWithLowPriority as I don't think I want to fully document this yet?

@mhiley
Copy link
Author

mhiley commented Nov 2, 2020

Can you rename the prop to unstable_validateFormWithLowPriority as I don't think I want to fully document this yet?

@jaredpalmer For sure, will try to get to it soon.

@vercel
Copy link

vercel bot commented Nov 6, 2020

@maddhruv is attempting to deploy a commit to the Formium Team on Vercel.

A member of the Team first needs to authorize it.

@mhiley
Copy link
Author

mhiley commented Nov 13, 2020

@jaredpalmer It looks like this PR is no longer relevant as of #2891? Do you have any ideas on how to address performance concerns with FieldArray now that low priority validation has been removed?

@jaredpalmer
Copy link
Owner

Formik 3 alpha which I'm about to release in a few minutes

@mhiley
Copy link
Author

mhiley commented Nov 13, 2020

Closing since this is no longer a valid strategy as of #2891

@mhiley mhiley closed this Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants