-
Notifications
You must be signed in to change notification settings - Fork 90
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
reusing one tippy #315
Comments
or in other words: i would like to have 1 tippy with multiple targets and the tippy will just be moved to the current target ;) |
lwPop.zip usage:this will be placed somewhere at the beginning (it does not really render something)
now in my rows i use:
|
@mech01nc01 sry for the late reply 1- u can use singleton, this way they all have the same config https://vue-tippy.netlify.app/flavor/component#singleton <tippy>
<template #content="{ state}">
<myCompoent v-if="state.isShown" />
</template>
</tippy> 3- you could create 1 custom instance, show them conditionally when they are on top of the buttons ( my recommendation is to apply (2) as a quick fix, then try to apply (1) or maybe (3) edit: a quick PoC: https://codesandbox.io/p/sandbox/vue-tippy-follow-mouse-forked-lhc8kd?file=%2Fsrc%2FApp.vue%3A54%2C24 |
thanks for your reply, will test. unfortunately your codesandbox link is not working :( |
Made it public |
Hi, I'm running into a somewhat similar issue. I am using the composition API version of Singleton, and when I do exactly as in the example (using |
plz share a reproduction link on https://vue.new/, and will help u figure that out u can already use components https://vue-tippy.netlify.app/flavor/component/#singleton, which uses useSingleton internally
try |
Hello,
i love your lib and i use it widely, but there was one thing i missed so i implemented some sort of "cloning", but that was very very poor and after updating vue to the latest version it broke partly
what i want to do:
create a tippy with a component:
as you can see, this tippy has no trigger, its just a "content-tippy"
now, i can do somehting like:
now for every element, the one and only tippy will be reused, without creating new instances
is something like this already possible or would it be possible to implement?
why?
i often use it for additional information in large lists, sometimes loading also additional data within the component
lets assume a list of 100 entries with 2 tippys per row, one static, one loads additional data
this results in 200 additional vue-components and 100 additional requests to the server
instead i would like to have just 2 additional vue-components and 1 request (plus more requests if the props of the components that loads async data change)
The text was updated successfully, but these errors were encountered: