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

dschreij picture dschreij  路  3Comments

efootstep picture efootstep  路  3Comments

cawa-93 picture cawa-93  路  3Comments

alterhu2020 picture alterhu2020  路  3Comments

dohomi picture dohomi  路  3Comments