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

Bug when using keep-values with conditional fields #4247

Closed
4 of 5 tasks
Waleed-KH opened this issue May 9, 2023 · 1 comment
Closed
4 of 5 tasks

Bug when using keep-values with conditional fields #4247

Waleed-KH opened this issue May 9, 2023 · 1 comment
Labels
🐛 bug Unintended behavior

Comments

@Waleed-KH
Copy link

Waleed-KH commented May 9, 2023

What happened?

Since v4.9, Form with keep-values submission/validation get stuck when having conditional Fields, I noticed that this happens because even though the conditional fields are out of the view, it still exist in the form context

image

Reproduction steps

  1. Create a From with keep-values attribute
  2. Add some conditional Fields to the form with some rules
  3. Switch the view to show other Field
  4. Add value to the field to satisfy the validation and try to submit
  5. Observe the form is unable to submit because it's trying to validate the Field that are not mounted
    ...

Version

Vue.js 3.x and vee-validate 4.x

What browsers are you seeing the problem on?

  • Firefox
  • Chrome
  • Safari
  • Microsoft Edge

Relevant log output

No response

Demo link

https://stackblitz.com/edit/vitejs-vite-qk6muc?file=src%2Fmain.ts,src%2Fcomponents%2FHelloWorld.vue&terminal=dev

Code of Conduct

@logaretm
Copy link
Owner

logaretm commented May 9, 2023

Thanks for reporting this, I found the issue and will be tagged in a patch release once I finish a couple of bug fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants