KABBOUCHI / vue-tippy

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

followCursor and inlinePositioning are not valids props #227

Closed Biosha closed 2 years ago

Biosha commented 2 years ago

Hello,

I'm reworking how I handle ToolTips thanks to your module. I get error in my web console while trying the followCursor and inlinePositioning.

My projects is under Vue 3 with typescript and I update to 6.0.0-alpha.42. Here is my main.ts :

import { createApp } from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import { createI18n } from 'vue-i18n';
import { messages, defaultLocale } from '@/i18n';
import './css/main.scss';
import { plugin as VueTippy } from 'vue-tippy';

const i18n = createI18n({
    messages,
    locale: defaultLocale,
    fallbackLocale: defaultLocale
});

createApp(App)
    .use(store)
    .use(router)
    .use(i18n)
    .use(VueTippy, {
        directive: 'tippy',
        defaultProps: {
            placement: 'bottom-start',
            followCursor: true,
            allowHTML: true,
            inlinePositioning: true,
            duration: [50, 50],
            hideOnClick: false
        }
    })
    .mount('#app');

And here is how I use the v-tippy directive :

<img
    class="icon"
    :src="getImg('map', 'icon', place.icon)"
    v-tippy="{ content: $t(`place.name.${place.name}`), theme: 'map' }"
/>

The props are working perfectly (tooltip are following the cursor) but this is message I get in the console :

tippy.js

`followCursor` is not a valid prop. You may have spelled it incorrectly, or if it's a plugin, forgot to pass it in an array as props.plugins. 

All props: https://atomiks.github.io/tippyjs/v6/all-props/
Plugins: https://atomiks.github.io/tippyjs/v6/plugins/

👷‍ This is a development-only message. It will be removed in production.

I don't think it's a blocking issue but maybe I missed something ?

KABBOUCHI commented 2 years ago

hi @Biosha, u can safely ignore it, I opened a PR for it https://github.com/atomiks/tippyjs/pull/1025

Biosha commented 2 years ago

Thanks a lot !