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

Add unbind to v-show (fix #4484) #4490

Closed
wants to merge 3 commits into from
Closed

Add unbind to v-show (fix #4484) #4490

wants to merge 3 commits into from

Conversation

defcc
Copy link
Member

@defcc defcc commented Dec 15, 2016

fix #4484

If element exists in dom tree, will set its display property back.

Apply possible transition if value is false.

@yyx990803
Copy link
Member

yyx990803 commented Dec 21, 2016

Thanks @defcc - there are a few issues with this fix: if we always reset the display in unbind, then elements hidden by v-show will be revealed if it is inside an element with a leaving transition. So we need to differentiate between a destroy unbind vs. a patch unbind, and only reset display for patch unbind. Transition check is not necessary for patch unbind because a patch unbind cannot happen to common child of the same <transition> component.

I added a 5th argument to unbind in a977642 (and used your test case)

@yyx990803 yyx990803 closed this Dec 21, 2016
@defcc
Copy link
Member Author

defcc commented Dec 22, 2016

Thanks for your comment.

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

Successfully merging this pull request may close these issues.

node with v-show inside v-if is reused in the adjacent v-else
2 participants