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

Trigger a warning when v-show and other incompatible directives are used on <template> #10786

Open
mrleblanc101 opened this issue Oct 31, 2019 · 0 comments

Comments

@mrleblanc101
Copy link

@mrleblanc101 mrleblanc101 commented Oct 31, 2019

What problem does this feature solve?

Hi,

I lost quite some time trying to figure out when my code didn't work.
The error was on my part, not vue, but i think Vue should trigger an error in this case.

The problem is that you CANNOT use v-show on a <template> tag, which make sense since v-show add inline style to the node and the <template> tag does not render a node.

What does the proposed API look like?

A Vue warning/error should suggest changing the v-if (if possible) or change the <template> tag for a DOM element (like a <div>)

@posva posva changed the title v-show on <template> should trigger warning/error Trigger a warning when v-show and other incompatible directives are used on <template> Oct 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.