vue-fontawesome
vue-fontawesome copied to clipboard
Fixes toggling v-show fails with icon and layers text
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.
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",
@robmadole would it be possible to release this fix to avoid weird issues with v-show?