From 148fde4c5cd95a712a084d49a2eab6fbad4da993 Mon Sep 17 00:00:00 2001 From: Sadegh Barati Date: Fri, 13 Oct 2023 22:15:25 +0330 Subject: [PATCH] fix: `inheritAttrs` false, remove duplicated `nextTick` --- apps/www/src/lib/registry/default/ui/calendar/Calendar.vue | 5 ++++- apps/www/src/lib/registry/new-york/ui/calendar/Calendar.vue | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/www/src/lib/registry/default/ui/calendar/Calendar.vue b/apps/www/src/lib/registry/default/ui/calendar/Calendar.vue index e21660e8..e90acfb6 100644 --- a/apps/www/src/lib/registry/default/ui/calendar/Calendar.vue +++ b/apps/www/src/lib/registry/default/ui/calendar/Calendar.vue @@ -7,6 +7,10 @@ import { computed, nextTick, onMounted, ref } from 'vue' import { buttonVariants } from '../button' import { cn } from '@/lib/utils' +defineOptions({ + inheritAttrs: false, +}) + const props = withDefaults(defineProps<{ modelValue?: string | number | Date | Partial<{ start: Date @@ -41,7 +45,6 @@ function handleNav(direction: 'prev' | 'next') { } onMounted(async () => { - await nextTick() await nextTick() if (modelValue.value instanceof Date && calendarRef.value) calendarRef.value.focusDate(modelValue.value) diff --git a/apps/www/src/lib/registry/new-york/ui/calendar/Calendar.vue b/apps/www/src/lib/registry/new-york/ui/calendar/Calendar.vue index fbeb8f8e..899ebccd 100644 --- a/apps/www/src/lib/registry/new-york/ui/calendar/Calendar.vue +++ b/apps/www/src/lib/registry/new-york/ui/calendar/Calendar.vue @@ -7,6 +7,10 @@ import { computed, nextTick, onMounted, ref } from 'vue' import { buttonVariants } from '../button' import { cn } from '@/lib/utils' +defineOptions({ + inheritAttrs: false, +}) + const props = withDefaults(defineProps< { modelValue?: string | number | Date | Partial<{ start: Date @@ -41,7 +45,6 @@ function handleNav(direction: 'prev' | 'next') { } onMounted(async () => { - await nextTick() await nextTick() if (modelValue.value instanceof Date && calendarRef.value) calendarRef.value.focusDate(modelValue.value)