Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

Pass event listeners to dialog? #28

Open
arthabus opened this issue Sep 16, 2020 · 3 comments
Open

Pass event listeners to dialog? #28

arthabus opened this issue Sep 16, 2020 · 3 comments

Comments

@arthabus
Copy link

Hi, is there a way to pass event listeners to dialog component?

I'm using create and I know I can pass a function to prop as a workaround but for consistency with my other code I'm looking for a way to pass event listeners so they are attached to the dialog's $listeners

Would appreciate any input on that.

@hjkcai
Copy link
Owner

hjkcai commented Sep 28, 2020

There is currently no way to pass listeners to the dialog component. Your workaround is the only way.

However, thick twice that why do you need another "callback" when you prompt the user? vue-modal-dialogs is designed for ask&answer model.

@arthabus
Copy link
Author

Thanks, got you. I need this for different sorts of async validations - the dialog must be closed only after the validation was successful and the validation can't be a part of the dialog's implementation for it to be reusable.

@hjkcai
Copy link
Owner

hjkcai commented Oct 3, 2020

Maybe just import the validator directly in the dialog component? That seems easier 😄

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants