vue-fontawesome icon indicating copy to clipboard operation
vue-fontawesome copied to clipboard

Fixes toggling v-show fails with icon and layers text

Open otijhuis opened this issue 4 years ago • 2 comments

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.

otijhuis avatar Jun 05 '21 20:06 otijhuis

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",

bobvandevijver avatar Jun 06 '21 09:06 bobvandevijver

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

kad-tijhuo avatar Jul 30 '21 09:07 kad-tijhuo