-
-
Notifications
You must be signed in to change notification settings - Fork 665
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
vue/require-toggle-inside-transition - question: should it still be an error with a conditional appear attribute? #2467
Comments
If a conditional |
Why not set |
Unfortunately, it wouldn't work in our case because it's essentially like this: <transition :appear="isNotInitialLoad">
<div>
<some-component />
</div>
</transition>
This is not a top level component - we have others at the same level so there is navigation to and from others that are like this with a conditional There is an animation when going between pages but we don't want this to appear on the first load because it looks a little strange. Maybe we're approaching how to do this a little wrong, and there should be some transitions at a higher level but it might be a quite big refactor with how it's set up right now. |
Hmm, I'm not sure whether this kind of usage should be encouraged by not reporting an error. @ota-meshi what do you think? |
Hmm. In my opinion, |
Okay, then this is open for contributions. If anyone is interested, a PR is welcome! Please add these test cases: <!-- PASS -->
<transition appear><div /></transition>
<transition :appear="foo"><div /></transition>
<transition :appear="true"><div /></transition>
<!-- FAIL -->
<transition :appear="false"><div /></transition> |
The
|
If it's OK, I'll hopefully take a look at this some time in the not too distant future - maybe this week or next. |
What rule do you want to change?
Does this change cause the rule to produce more or fewer warnings?
How will the change be implemented? (New option, new default behavior, etc.)?
Please provide some example code that this change will affect:
What does the rule currently do for this code?
<transition>
is expected to have av-if
orv-show
directive"What will the rule do after it's changed?
Additional context
We are using a conditional
appear
attribute so that the animation is not shown on the first load of the app, only when navigating between components.I'm not 100% sure this is a valid use of appear and transition, so I would like to confirm this too.
Thanks!
The text was updated successfully, but these errors were encountered: