Fixed event skeleton not being reset on edit close

This commit is contained in:
Alexis
2025-03-04 14:15:57 +01:00
parent 5df57ee587
commit d73fe93812
3 changed files with 19 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
<script lang="ts" setup>
const { eventSkeleton, lastActiveEvent, isEditEventModalOpen } = storeToRefs(useCalendar())
const { resetSkeleton } = useCalendar();
// Watch the popover state
watch(isEditEventModalOpen, (hasOpened, _o) => {
@@ -15,6 +16,7 @@ watch(isEditEventModalOpen, (hasOpened, _o) => {
*/
function handleClosing() {
isEditEventModalOpen.value = false
setTimeout(() => resetSkeleton(), 100)
}
</script>