Skip to content

Modal triggered by button inside dropdown list does not show up #3292

Answered by rustem-nasyrov
pedrovgp asked this question in Q&A
Discussion options

You must be logged in to vote

Hello, @pedrovgp! I found a solution for you. You need to add .stop event modifier to the @click listener. It will prevent bubbling event up. Also, I recommend you to wrap your Modal.vue template contents with div, to avoid vue warnings in the console.

<template>
  <div>
    <va-button @click.stop="showContent = !showContent"> Registry </va-button>
    <va-modal v-model="showContent" :title="'Registry'" :message="'Test message'" />
  </div>
</template>

<script setup lang="ts">
  import { ref } from 'vue'
  const showContent = ref(false)
</script>

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@pedrovgp
Comment options

Answer selected by pedrovgp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants