Vuetify: [Feature Request] Emit close event when dialog closes

Created on 14 May 2018  路  2Comments  路  Source: vuetifyjs/vuetify

Problem to solve

Often when you close a dialog you want do to some cleanup. The docs suggest you do:

watch: {
    dialog(val) {
        val || this.close();
    },
},

But it seems emitting a close event would be simpler.

Proposed solution

Emit a close event, so you can do

<v-dialog v-model="dialog" @close="close">...</v-dialog>

feature wontfix

Most helpful comment

Listen to @input event
<v-dialog @input="v => v || doSomething()">

All 2 comments

Listen to @input event
<v-dialog @input="v => v || doSomething()">

On a side note, as per Vue docs, we want to pretty avoid watch and use computed AMAP.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ricardovanlaarhoven picture ricardovanlaarhoven  路  3Comments

smousa picture smousa  路  3Comments

Antway picture Antway  路  3Comments

alterhu2020 picture alterhu2020  路  3Comments

paladin2005 picture paladin2005  路  3Comments