Make work with components that also set there own class
weotch opened this issue · comments
Robert Reinhard commented
Like so it can be used on a vue-visual instance.
Robert Reinhard commented
I came up with a solution by passing the vnode
through to the update
function and then setting this at the end:
vnode.data.staticClass += ' ' + el.classList.value
This fixed the specific issue I was investigating this for. But then I ran across this: vuejs/vue#3871. Also, it seems risky, like I don't totally understand how staticClass
works and I would be touching it as viewport changes. Like it's not really static ...
I think in cases where this would be used on a component that sets a dynamic class, it should instead be applied to a parent element.