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

Make work with components that also set there own class #4

Closed
weotch opened this issue Sep 25, 2018 · 1 comment
Closed

Make work with components that also set there own class #4

weotch opened this issue Sep 25, 2018 · 1 comment

Comments

@weotch
Copy link
Member

weotch commented Sep 25, 2018

Like so it can be used on a vue-visual instance.

@weotch
Copy link
Member Author

weotch commented Sep 25, 2018

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.

@weotch weotch closed this as completed in 3948187 Sep 25, 2018
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

No branches or pull requests

1 participant