Skip to content

Modal Return Values #44

Answered by Jenesius
ShrimpFriedCode asked this question in Q&A
Dec 3, 2021 · 4 comments · 7 replies
Discussion options

You must be logged in to vote

I update version of package. 1.4.7
For more information: docs
I add instance prop to ModalObject:

const modal = await openModal(Modal);
modal.instance

Also update information about onclose function and access to modal instance:

//Modal.vue
{
    props: {},
    data: () => {
        return {
            insideValue: "Hello"
        }
    }
}
const modal = await openModal(Modal);
modal.onclose = function(){
    this.insideValue; // "Hello"
    modal.instance.insideValue; // "Hello"
}

How to pass values to onclose function i dont resolve, because you can execute closeModal in any point in your application, so in one place, for example in he modal, u can pass some values to closeModal, but i…

Replies: 4 comments 7 replies

Comment options

You must be logged in to vote
5 replies
@acrolink
Comment options

@Jenesius
Comment options

@acrolink
Comment options

@Jenesius
Comment options

@acrolink
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

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

Comment options

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

Answer selected by Jenesius
# for free to join this conversation on GitHub. Already have an account? # to comment
Category
Q&A
Labels
None yet
3 participants