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

Veevalidates Field triggers writable computed multiple times #4461

Closed
3 of 5 tasks
Theiaz opened this issue Sep 6, 2023 · 1 comment
Closed
3 of 5 tasks

Veevalidates Field triggers writable computed multiple times #4461

Theiaz opened this issue Sep 6, 2023 · 1 comment
Labels
🐛 bug Unintended behavior

Comments

@Theiaz
Copy link

Theiaz commented Sep 6, 2023

What happened?

First of all: I don't know wheter this is a bug or expected behaviour (or my code is incorrect and needs some improvements...).

I've created a short demo on stackblitz to demonstrate the behaviour. Just have a look at the console log or in the timeline of vue devtools.

Problem: Using the Field component of VueValidates differs from the behaviour of using a native input-tag. My computed property (which is used to update the parent state) is triggered twice.

In my opinion using Field-tag should not differ from using input-tag, should'nt it?

Reproduction steps

  1. Open stackblitz
  2. Open console and/or vue devtools timeline
  3. Type in input fields
  4. Look at console output or component event in vue devtools
    Screenshot 2023-09-06 at 13 13 02

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-rchpvj?file=src%2Fcomponents%2FChild.vue

Code of Conduct

@logaretm logaretm added the 🐛 bug Unintended behavior label Sep 29, 2023
@logaretm
Copy link
Owner

Sorry for the delay, thanks for reporting this. I think I found the source of those extra events, and will be tagging the fix in the next release.

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