Skip to content

Singleton composition API not working with conditional content #312

@mattbryson

Description

@mattbryson

I'm trying to group a few Buttons using the useSingleton approach.

This works when the Buttons are present when the component mounts, but if they are conditionally added later, they just use the default Tippy settings, not the singleton settings.

See a working demo here

It does work if you use the <tippy> and <tippy-singleton> components, but not if you mix the v-tippy directive, and the useSingleton composition API as per the example https://vue-tippy.netlify.app/flavor/composition-api#example-1-1

I have tried calling useSingleton after they are added, have tried delaying adding them to the instances array etc etc but nothing I do appears to work.

Any ideas on how to get this working?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions