From be32a018c662bf8736edd965c8e1427a3c6d1714 Mon Sep 17 00:00:00 2001 From: Alexis Date: Mon, 11 Aug 2025 20:23:25 +0200 Subject: [PATCH] Added input focus on entity forms --- app/components/calendar/form/Create.vue | 4 ++++ app/components/calendar/form/Update.vue | 4 ++++ app/components/world/form/Create.vue | 4 ++++ app/components/world/form/Update.vue | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/app/components/calendar/form/Create.vue b/app/components/calendar/form/Create.vue index fe83a2f..2ea85da 100644 --- a/app/components/calendar/form/Create.vue +++ b/app/components/calendar/form/Create.vue @@ -16,6 +16,9 @@ onMounted(() => { type FormTabs = "global" | "months" | "today" const activeTab = ref("global") +const newCalendarName = shallowRef() +useFocus(newCalendarName, { initialValue: true }) + /** * === Current date === */ @@ -103,6 +106,7 @@ function handleFormCancel() { { type FormTabs = "global" | "months" | "today" const activeTab = ref("global") +const newCalendarName = shallowRef() +useFocus(newCalendarName, { initialValue: true }) + /** * === Form Validation === */ @@ -85,6 +88,7 @@ function handleFormCancel() { { worldSkeleton.value = { ...defaultWorld } }) +const newWorldName = shallowRef() +useFocus(newWorldName, { initialValue: true }) + const isLoading = ref(false) /** @@ -61,6 +64,7 @@ function handleFormCancel() {
{ worldSkeleton.value = { ...props.world } as World }) +const newWorldName = shallowRef() +useFocus(newWorldName, { initialValue: true }) + const isLoading = ref(false) /** @@ -75,6 +78,7 @@ function handleFormCancel() {