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

fixes-#3235:userName_dup_check added some delay to call API #3264

Conversation

PratyushSawan
Copy link
Contributor

Fixes #3235

Changes:

This Fix ensures that the asyncValidate function only runs after 500ms of inactivity. It decreased the API Call significantly.
All the previous functionality working as it is.

Here is the Test Video:

fixes-.3235_userName_dup_check.-.Made.with.Clipchamp.mp4

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. Fixes #123

@PratyushSawan PratyushSawan changed the title fixes-#3235:userName_dup_check fixes-#3235:userName_dup_check improvment Nov 3, 2024
@PratyushSawan PratyushSawan changed the title fixes-#3235:userName_dup_check improvment fixes-#3235:userName_dup_check added some delay to call API Nov 3, 2024
@lindapaiste
Copy link
Collaborator

It looks like you are on the right track with this approach. I suspect that we want separate timeoutId variables for the username and email checks (ie. usernameTimeoutId and emailTimeoutId). Otherwise editing one field will cancel the timeout on the other.

@PratyushSawan
Copy link
Contributor Author

Hi @lindapaiste Thanks for your input, I added the desired changes as per you suggestion.

Thank you.

@raclim
Copy link
Collaborator

raclim commented Dec 11, 2024

Thanks so much again for your work on this!

While this is functional, I don't think this is a complete solution yet and might need some further work to get there. Since it's been a while since this PR was last active, I'm going to close this for now.

I'm sorry that we couldn't get this in, but please feel free to reopen this PR with any updates or check out our other issues!

@raclim raclim closed this Dec 11, 2024
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.

Enhance SignupForm with Debounced Validation
3 participants