You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a component that render its content through a render function and render a child component with a static class attribute
In the child component, add a class binding to the root element
When the class binding is applied (for example, when a condition becomes true) the static classes passed from the parent component render function is lost
What is expected?
That the child component keeps both the static and dynamic classes
What is actually happening?
Only the dynamic classes added through the v-bind:class are kept in the root element
I looked through other issues reporting similar behaviors, the one more likely to be related is issue #1014 , but this one differs from that case since any of the components here are functional components.
The example in the fiddle is a simplified version to showcase the problem. In my use-case, the parent component can render a different child component depending on a prop or state, the parent acts as a "proxy" or "polymorphic" component for several different children.
The text was updated successfully, but these errors were encountered:
Version
2.5.16
Reproduction link
https://jsfiddle.net/jmabj70u/
updated: added
child-compoent
directly to compare expected vs actual resultshttps://jsfiddle.net/jmabj70u/1/
Steps to reproduce
What is expected?
That the child component keeps both the static and dynamic classes
What is actually happening?
Only the dynamic classes added through the v-bind:class are kept in the root element
I looked through other issues reporting similar behaviors, the one more likely to be related is issue #1014 , but this one differs from that case since any of the components here are functional components.
updated: actual issue is vuejs/vue-loader#1014 (comment) see comment below
The example in the fiddle is a simplified version to showcase the problem. In my use-case, the parent component can render a different child component depending on a prop or state, the parent acts as a "proxy" or "polymorphic" component for several different children.
The text was updated successfully, but these errors were encountered: