Feature request - Programatically close q-dialog from within #17332
Unanswered
stefaanMLB
asked this question in
General - Components / Directives / etc
Replies: 3 comments 5 replies
-
You just toggle the v-model of the dialog in your click handler to close. It's quite simple. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Sorry for my ignorance, but how can I access the v-model from within the dialog in a setup script ? |
Beta Was this translation helpful? Give feedback.
4 replies
-
So this is also how the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When a
q-dialog
is used within a child component and used in a parent component thev-close-popup
directive allows to close the dialog from within the child component as shown in the code below. Luckily the@click
handler is executed while the dialog data is still valid.It would be nice to be able to close the dialog programmatically at the end of the
@click
handler instead of using thev-close-popup
directive because that emphasizes the programmatic logic of executing the code first and closing the dialog after that.The
v-close-popup
directive is kind of "spooky action on a distance"Beta Was this translation helpful? Give feedback.
All reactions