Vuesax: Prevent dialog from closing

Created on 4 Sep 2019  路  3Comments  路  Source: lusaxweb/vuesax

How to stop the dialog from closing from inside the cancel-method?

<vs-prompt
            name="CRMAPIDialog"
            :title="diaTitle"
            :type="diaType"
            :accept-text="accepttext"
            :cancel-text="canceltext"
            @cancel="cancelDialog"
            @accept="acceptDialog"
            @close="closeDialog"
            :is-valid="diaisValid"
            :buttons-hidden="!showButtons"
            :active.sync="$parent.showapidia">
                        /* */
                        cancelDialog : function(){

                            console.log('cancelDialog');


                        },

Most helpful comment

You can't prevent dialog from closing,
you have to open it again (it will not be visible to the end user, no animation)

cancelDialog : function(){
    this.$parent.showapidia = true
},

perhaps it's a feature that can be added, like an :auto-close="false" attribute or something like that

All 3 comments

Have you tried return false ?

You can't prevent dialog from closing,
you have to open it again (it will not be visible to the end user, no animation)

cancelDialog : function(){
    this.$parent.showapidia = true
},

perhaps it's a feature that can be added, like an :auto-close="false" attribute or something like that

Oh thx! This makes sense regarding the vue logic. I'll try that.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sangdth picture sangdth  路  4Comments

mjmnagy picture mjmnagy  路  3Comments

alexflorea2 picture alexflorea2  路  4Comments

jupox picture jupox  路  3Comments

ccalvarez picture ccalvarez  路  4Comments