Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dialog closed called twice #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions packages/playground-vue/src/components/dialog/dialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
leaveTo="opacity-0"
entered="opacity-75"
>
<DialogOverlay className="fixed inset-0 bg-gray-500 transition-opacity" />
<div className="fixed inset-0 bg-gray-500 transition-opacity"></div>
</TransitionChild>

<TransitionChild
Expand All @@ -41,7 +41,7 @@
<span class="hidden sm:inline-block sm:h-screen sm:align-middle" aria-hidden="true">
&#8203;
</span>
<div
<DialogPanel
class="inline-block transform overflow-hidden rounded-lg bg-white text-left align-bottom shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg sm:align-middle"
>
<div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
Expand Down Expand Up @@ -172,7 +172,7 @@
Cancel
</button>
</div>
</div>
</DialogPanel>
</TransitionChild>
</div>
</div>
Expand All @@ -185,6 +185,7 @@ import { ref, defineComponent, h } from 'vue'
import {
Dialog,
DialogTitle,
DialogPanel,
DialogOverlay,
Menu,
MenuButton,
Expand Down Expand Up @@ -267,7 +268,7 @@ export default {
Nested,
Dialog,
DialogTitle,
DialogOverlay,
DialogPanel,
Menu,
MenuButton,
MenuItems,
Expand All @@ -294,6 +295,7 @@ export default {
trigger,
container,
setIsOpen(value) {
console.log('this is logged twice')
isOpen.value = value
},
toggleIsOpen() {
Expand Down