AlexLavoie42 / Nuxt-Mapbox

Elegant Mapbox integration with Nuxt
81 stars 11 forks source link

unable to handle a click inside the popup #80

Closed jbiddulph closed 8 months ago

jbiddulph commented 8 months ago

I am showing a button in my map popup, when I click it, nothing happens...


<template>
    <Button
                    type="button"
                    class="viewDetailsBtn"
                    variant="outline"
                    size="small"
                    @click="console"
                >
            <span>Save</span>
    </Button>
</template>
<script setup lang="ts">
const console = () => {
    console.log('Hello you clicked the button');
};
</script>
AlexLavoie42 commented 8 months ago

Is your popup rendering at all? It seems you are missing the MapboxDefaultPopup. Your HTML should be nested inside of there. https://alexlavoie42.github.io/Nuxt-Mapbox/usage/popups-and-markers#popups-markers

AlexLavoie42 commented 8 months ago

Closing due to inactivity.