Skip to content
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

How refreshContent component? #306

Open
romastolbov opened this issue Feb 1, 2024 · 2 comments
Open

How refreshContent component? #306

romastolbov opened this issue Feb 1, 2024 · 2 comments

Comments

@romastolbov
Copy link

Currently, if you open a component with a text field inside useTippy, enter a value there, then close and re-open it, the field will remain filled. How can I get rid of keep-alive?

Not work:

const { refreshContent } = useTippy(triggerRef, {
  content: computed(() => {
    return h(ComponentList, {
      items: list.value,
      activeIndex: activeIndex.value, // always 0
      onHover: (value) => { activeIndex.value = value }
    })
  }),
  onHide() {
      refreshContent()
  },
 } 
@andrei-nikic-co
Copy link

andrei-nikic-co commented Jun 14, 2024

I have the same issue, refreshContent doesn't work.
I wonder, is there a way to call a method inside the rendered vue component? The one that can be exposed via defineExpose.

UPDATE: Due to some limitation on my side, I can use only the Composition API method - useTippy

@KABBOUCHI
Copy link
Owner

@andrei-nikic-co plz can u share a quick example here https://vue.new/? also i don't think refresh is needed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants