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

Each child disappears, when v-if inside ValidationProvider is falsy #3337

Closed
KubaC701 opened this issue Jun 3, 2021 · 2 comments
Closed

Comments

@KubaC701
Copy link

KubaC701 commented Jun 3, 2021

Versions

  • vee-validate: 3.4.8
  • vue: 2.6.11

Describe the bug

When the direct child of ValidationProvider has a v-if directive set to false, every child of ValidationProvider disappears from rendered HTML.
If you delete v-slot="{ errors }" from ValidationProvider and element which renders the error, everything works as expected.

To reproduce

Steps to reproduce the behavior:

  1. Go to https://codesandbox.io/s/bold-http-j81q7?file=/src/App.vue - nothing rendered.
  2. Change the v-if directive to true and input will appear.
  3. Change back v-if to false, remove v-slot="{ errors }" and span, which renders that error.
  4. Input appears again.

Expected behavior

Setting v-if directive to a child of ValidationProvider, when ValidationProvider has a v-slot="{ errors }" directive should affect only this particular element, not everything inside ValidationProvider.

Demo link

https://codesandbox.io/s/bold-http-j81q7?file=/src/App.vue

@KubaC701 KubaC701 changed the title Each children disappears, when v-if inside ValidationProvider is falsy Each child disappears, when v-if inside ValidationProvider is falsy Jun 3, 2021
@sebsobseb
Copy link
Contributor

sebsobseb commented Jun 3, 2021

I'm having the same issue. Demo: https://codesandbox.io/s/vee-validate-v3-vue-2613-render-bug-9ywvg?file=/BaseInput.vue

But, @logaretm it seems like it's a bug only with the (latest) Vue 2.6.13, because when I switch back to 2.6.12, there is no issue. Weird, because 2.6.13 should only be bug fixes 🤔

https://github.com/vuejs/vue/releases/tag/v2.6.13

@logaretm
Copy link
Owner

logaretm commented Jun 5, 2021

Looks like this is a Vue issue and not related to vee-validate, this was reported here vuejs/vue#12118

@logaretm logaretm closed this as completed Jun 5, 2021
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

No branches or pull requests

3 participants