Skip to content

jigDatepicker closes modal #11

Answered by coolsam726
mquevedob asked this question in Q&A
Discussion options

You must be logged in to vote

On Further evaluation, I have noticed that https://headlessui.dev/vue/dialog static option does not work as long as you have passed the onClose event to Dialog. As a work around, I have made the following modification and added a static prop to JigModal component. Now the component will check if static is true before calling the toggleModal method. If static is true, it will not close the modal. Just copy the code below and replace it in your js/JigComponents/JigModal.vue, then in your view that calls the dialog, simply pass the :static="true" prop to jig-modal.
This should work, I have tested it locally.
JigModal.vue

<template>
    <TransitionRoot appear :show="isOpen" as="template">
   …

Replies: 5 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

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

Comment options

You must be logged in to vote
2 replies
@mquevedob
Comment options

@coolsam726
Comment options

Comment options

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

Comment options

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

Answer selected by mquevedob
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants