KABBOUCHI / vue-tippy

VueJS Tooltip powered by Tippy.js
https://vue-tippy.netlify.app
MIT License
722 stars 86 forks source link

fix(tippy-component): use Element constructor for to prop #311

Open J-Michalek opened 2 months ago

J-Michalek commented 2 months ago

Using Element as the prop constructor should work just fine. The usage of Function constructor also causes Vue warnings, when an Element is provided as the value.

This way there is no longer need to cast the prop using PropType<string | Element>.

KABBOUCHI commented 2 months ago

@J-Michalek if remember correctly, using Element as value caused SSR issues in Nuxt few years back, I need to test it properly with Nuxt first.

J-Michalek commented 2 months ago

Well if it is still an issue today, may I suggest adding a comment to the prop so that it is obvious that it should indeed be that way? I am not using Nuxt, so I cannot easily help with testing it...