Skip to content

Accessing component methods without refs #370

Closed
@wishinghand

Description

@wishinghand

When using Vue2Leaflet components in a v-for, I often have need to modify that specific one after an event, like dragging a marker. When I look for ways to access a specific Vue2Leaflet component, I usually see recommendations to set a ref on it, then calling this.$refs.refName.mapObject.componentMethod. Is there a way to pass the instance of a component through an event so that component methods can then be called on them?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions