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

fix(componentRenderUtils): a wrong judge in shouldUpdateComponent (#677) #784

Closed
wants to merge 2 commits into from

Conversation

ysj16
Copy link
Contributor

@ysj16 ysj16 commented Feb 26, 2020

This PR is to fix #677, #677 can be more simple, the bug still exit without <transition-group>, there are two problems cause it.
I had resolved one, now #677 can patch text correctly.
About the color(class) patch error, I had found the reason. But I still have some confussion, I don't know what is the best way to fix it:In vue-next, a Component can have multi root element, so how to deal with class or style, all to inherit?
(I am not good at English.≥.≤)

@ysj16
Copy link
Contributor Author

ysj16 commented Feb 26, 2020

I found the warn just now.. I will try to fix the class patch error in this situation.
"vue.global.js:4748 [Vue warn]: Extraneous non-props attributes (class) were passed to component but could not be automatically inherited because component renders fragment or text root nodes."

@ysj16
Copy link
Contributor Author

ysj16 commented Feb 27, 2020

Done. @yyx990803

@yyx990803 yyx990803 closed this in 6810d14 Feb 28, 2020
@yyx990803
Copy link
Member

Thanks a lot for the PR - although it wasn't fully fixing the issue, it did help me identify the underlying problem faster.

See 6810d14 - we need to account for more possible merged attrs than just class or style. In addition, we should only attach/modify patchFlags when the child root is indeed an optimized node (indicated by the presence of dynamicChildren), otherwise we may cause it to bypass other necessary updates.

@ysj16
Copy link
Contributor Author

ysj16 commented Feb 28, 2020

Got it

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.

Inherited class binding on components inside transition-group is not updated
2 participants