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 isDialogOpen = ref<boolean>(false);
|
||||||
const { resetSkeleton } = useCalendar();
|
const { resetSkeleton } = useCalendar();
|
||||||
|
|
||||||
|
// Watch the popover state
|
||||||
|
watch(isDialogOpen, (hasOpened, _o) => {
|
||||||
|
if (hasOpened) {
|
||||||
|
resetSkeleton()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
// Toggles the dialog
|
// Toggles the dialog
|
||||||
function toggleDialog() {
|
function toggleDialog() {
|
||||||
isDialogOpen.value = !isDialogOpen.value;
|
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"
|
class="max-md:translate-0 max-md:inset-0 max-md:w-full max-md:block"
|
||||||
:trap-focus="true"
|
:trap-focus="true"
|
||||||
@escape-key-down="handleClosing"
|
@escape-key-down="handleClosing"
|
||||||
@pointer-down-outside.prevent="handleClosing"
|
@pointer-down-outside="handleClosing"
|
||||||
>
|
>
|
||||||
<UiDialogTitle class="max-md:mb-8">
|
<UiDialogTitle class="max-md:mb-8">
|
||||||
{{ $t("entity.calendar.event.addSingle") }}
|
{{ $t("entity.calendar.event.addSingle") }}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ function handleClosing() {
|
|||||||
@escape-key-down="handleClosing"
|
@escape-key-down="handleClosing"
|
||||||
@focus-outside="handleClosing"
|
@focus-outside="handleClosing"
|
||||||
@interact-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">
|
<header class="pl-8 grid gap-y-2 max-md:mb-8">
|
||||||
<UiDialogTitle>
|
<UiDialogTitle>
|
||||||
|
|||||||
Reference in New Issue
Block a user