diff --git a/packages/features/eventtypes/components/tabs/advanced/EventAdvancedTab.tsx b/packages/features/eventtypes/components/tabs/advanced/EventAdvancedTab.tsx index 292ca66979..35db19416f 100644 --- a/packages/features/eventtypes/components/tabs/advanced/EventAdvancedTab.tsx +++ b/packages/features/eventtypes/components/tabs/advanced/EventAdvancedTab.tsx @@ -1,4 +1,4 @@ -import { useState, Suspense, useMemo } from "react"; +import { useState, Suspense, useMemo, useEffect } from "react"; import type { Dispatch, SetStateAction } from "react"; import { Controller, useFormContext } from "react-hook-form"; import type { z } from "zod"; @@ -434,9 +434,14 @@ export const EventAdvancedTab = ({ !!formMethods.getValues("multiplePrivateLinks") && formMethods.getValues("multiplePrivateLinks")?.length !== 0 ); + const watchedInterfaceLanguage = formMethods.watch("interfaceLanguage"); const [interfaceLanguageVisible, setInterfaceLanguageVisible] = useState( - !!formMethods.getValues("interfaceLanguage") + watchedInterfaceLanguage !== null && watchedInterfaceLanguage !== undefined ); + + useEffect(() => { + setInterfaceLanguageVisible(watchedInterfaceLanguage !== null && watchedInterfaceLanguage !== undefined); + }, [watchedInterfaceLanguage]); const [redirectUrlVisible, setRedirectUrlVisible] = useState(!!formMethods.getValues("successRedirectUrl")); const bookingFields: Prisma.JsonObject = {}; @@ -784,7 +789,7 @@ export const EventAdvancedTab = ({ ( { onChange(option?.value); }} - value={interfaceLanguageOptions.find((option) => option.value === value)} + value={interfaceLanguageOptions.find((option) => option.value === value) || undefined} />