Fixed quick create dialog not resetting skeleton
This commit is contained in:
@@ -6,6 +6,13 @@ import { VisuallyHidden } from "radix-vue";
|
||||
const isDialogOpen = ref<boolean>(false);
|
||||
const { resetSkeleton } = useCalendar();
|
||||
|
||||
// Watch the popover state
|
||||
watch(isDialogOpen, (hasOpened, _o) => {
|
||||
if (hasOpened) {
|
||||
resetSkeleton()
|
||||
}
|
||||
})
|
||||
|
||||
// Toggles the dialog
|
||||
function toggleDialog() {
|
||||
isDialogOpen.value = !isDialogOpen.value;
|
||||
@@ -45,7 +52,7 @@ const breakpoints = useBreakpoints(
|
||||
class="max-md:translate-0 max-md:inset-0 max-md:w-full max-md:block"
|
||||
:trap-focus="true"
|
||||
@escape-key-down="handleClosing"
|
||||
@pointer-down-outside.prevent="handleClosing"
|
||||
@pointer-down-outside="handleClosing"
|
||||
>
|
||||
<UiDialogTitle class="max-md:mb-8">
|
||||
{{ $t("entity.calendar.event.addSingle") }}
|
||||
|
||||
@@ -29,7 +29,7 @@ function handleClosing() {
|
||||
@escape-key-down="handleClosing"
|
||||
@focus-outside="handleClosing"
|
||||
@interact-outside="handleClosing"
|
||||
@pointer-down-outside="(e) => e.preventDefault()"
|
||||
@pointer-down-outside.prevent
|
||||
>
|
||||
<header class="pl-8 grid gap-y-2 max-md:mb-8">
|
||||
<UiDialogTitle>
|
||||
|
||||
Reference in New Issue
Block a user