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

Fixes toggling v-show fails with icon and layers text #315

Open
wants to merge 1 commit into
base: 3.x
Choose a base branch
from

Conversation

otijhuis
Copy link
Contributor

@otijhuis otijhuis commented Jun 5, 2021

Fixes #313

v-show didn't work when used directly on <font-awesome-icon> after the reactivity change.
It did work when it was wrapped in another element like a div or as a root element in a wrapper component.
I changed the icon and layers text so that the returned value is wrapped in h() which I suspect is the same thing that happens when it's the root element of a wrapper component.

I couldn't find a way to test it automatically. I tried compileAndMount with v-show but it didn't fail. Could be that the problem was introduced somewhere between Vue 3.0.0 and 3.0.11 but the current test utils version doesn't work with 3.0.11. I did test it manually and toggling v-show no longer failed.

@bobvandevijver
Copy link

I tested this change using the following in my package.json and it does indeed fix #313 for me 👍🏻

"@fortawesome/vue-fontawesome": "git://github.com/otijhuis/vue-fontawesome.git#579bddb1dc0ee1b9a02b50ec821d44567cf00a1f",

@kad-tijhuo
Copy link

@robmadole would it be possible to release this fix to avoid weird issues with v-show?

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.

3 participants