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

Backend validation flicker #837

Closed
kadfak opened this Issue Sep 19, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@kadfak

kadfak commented Sep 19, 2017

Versions:

  • VueJs: 2.4.4
  • Vee-Validate: 2.0.0-rc.17

Description:

I've created a custom rule to check whether an email is available. The problem is that when the custom rule is validated, a small flicker occurs because of calling the API endpoint.

I'm wondering if it is possible to somehow not discard the error before the API roundtrip is complete. Right now it seems that the error is cleared and re-rendered only after the API call returns.

Steps To Reproduce:

The example at the end of http://vee-validate.logaretm.com/examples.html#backend-example illustrates the problem.

@logaretm

This comment has been minimized.

Show comment
Hide comment
@logaretm

logaretm Sep 19, 2017

Collaborator

Currently the errors are only discarded just before the validation, I'm working on enhancements like discarding when the new errors arrive which should fix the issue.

Collaborator

logaretm commented Sep 19, 2017

Currently the errors are only discarded just before the validation, I'm working on enhancements like discarding when the new errors arrive which should fix the issue.

@motatoes

This comment has been minimized.

Show comment
Hide comment
@motatoes

motatoes Oct 29, 2017

Greetings, I've arrived here from the hacktoberfest website. I've read the issue and checked out the example, but I don't see any flicker occuring? Has this issue been fixed already?

motatoes commented Oct 29, 2017

Greetings, I've arrived here from the hacktoberfest website. I've read the issue and checked out the example, but I don't see any flicker occuring? Has this issue been fixed already?

@logaretm

This comment has been minimized.

Show comment
Hide comment
@logaretm

logaretm Oct 29, 2017

Collaborator

@motatoes Greetings motatoes, the issue hasn't been resolved yet. The example was just fixed to avoid the issue for now. this is not a bug, just a simple side effect (bug? 😄).

Basically the problem occurs before validating the field here

we want to move the error removal just before the new errors are populated by the _test method. Let me know if you need more guidance.

Collaborator

logaretm commented Oct 29, 2017

@motatoes Greetings motatoes, the issue hasn't been resolved yet. The example was just fixed to avoid the issue for now. this is not a bug, just a simple side effect (bug? 😄).

Basically the problem occurs before validating the field here

we want to move the error removal just before the new errors are populated by the _test method. Let me know if you need more guidance.

@motatoes

This comment has been minimized.

Show comment
Hide comment
@motatoes

motatoes Oct 30, 2017

Thanks for your reply @logaretm

The example was just fixed to avoid the issue for now.

Could you please tell me how I can reproduce the flickering locally? I just want to produce it locally to understand what's going on and attempt your suggested fix from there. Thanks

motatoes commented Oct 30, 2017

Thanks for your reply @logaretm

The example was just fixed to avoid the issue for now.

Could you please tell me how I can reproduce the flickering locally? I just want to produce it locally to understand what's going on and attempt your suggested fix from there. Thanks

@logaretm logaretm closed this in f8035ee Nov 9, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment