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

fix(Dialog): add afterLeave event #19664

Merged
merged 1 commit into from Apr 22, 2024
Merged

Conversation

lzl0304
Copy link
Contributor

@lzl0304 lzl0304 commented Apr 22, 2024

Description

fixes #19660

Markup:

<template>
  <v-app>
    <v-container>
      <v-dialog v-model="showDialog" width="600" @after-leave="onAfterLeave()">
        <div class="content">Content</div>
      </v-dialog>
      <v-btn @click="reset">Reset</v-btn>
      <div>{{ hidden ? "hidden" : "visible" }}</div>
    </v-container>
  </v-app>
</template>

<script setup>
  import { ref } from 'vue'

  const showDialog = ref(true)
  const hidden = ref(false)

  function reset () {
    showDialog.value = true
    hidden.value = false
  }

  function onAfterLeave () {
    hidden.value = true
  }
</script>
<style scoped>
.content {
  width: 200px;
  height: 200px;
  background-color: #fff;
}
</style>

@johnleider johnleider added this to the v3.5.x milestone Apr 22, 2024
@johnleider johnleider added T: bug Functionality that does not work as intended/expected C: VDialog VDialog labels Apr 22, 2024
@johnleider johnleider merged commit d5f1dc3 into vuetifyjs:master Apr 22, 2024
10 checks passed
@lzl0304 lzl0304 deleted the fix-19660 branch April 22, 2024 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VDialog VDialog T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report][3.5.15] Dialog onAfterLeave not firing in v3.5.15 and v3.5.16
2 participants