From dd3330da5e18cee09a06f4bad1590d6e83d727e4 Mon Sep 17 00:00:00 2001 From: Firman Ramdhani <33869609+firmanramdhani@users.noreply.github.com> Date: Tue, 4 Aug 2026 16:45:12 +0700 Subject: [PATCH] fix: prevent menu closure when switching language in user dropdown Set comboboxProps={{ withinPortal: false }} on the language Select inside Menu.Dropdown so its option list renders inside the Menu's DOM tree rather than a portal. This prevents the Menu from treating option clicks as outside interactions and closing before changeLanguage fires. --- apps/web/src/apps/auth/login/index.tsx | 1 + apps/web/src/apps/main/layouts/components/header.layout.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/apps/web/src/apps/auth/login/index.tsx b/apps/web/src/apps/auth/login/index.tsx index 7053075..3fd3545 100644 --- a/apps/web/src/apps/auth/login/index.tsx +++ b/apps/web/src/apps/auth/login/index.tsx @@ -87,6 +87,7 @@ export default function LoginPage() { size="xs" variant="unstyled" w={90} + comboboxProps={{ withinPortal: false }} data={[ { value: 'en', label: t('common:english') }, { value: 'id', label: t('common:indonesian') }, diff --git a/apps/web/src/apps/main/layouts/components/header.layout.tsx b/apps/web/src/apps/main/layouts/components/header.layout.tsx index b4223a3..e3ae7eb 100644 --- a/apps/web/src/apps/main/layouts/components/header.layout.tsx +++ b/apps/web/src/apps/main/layouts/components/header.layout.tsx @@ -176,6 +176,7 @@ export default function HeaderLayout() { size="xs" variant="unstyled" w={110} + comboboxProps={{ withinPortal: false }} data={[ { value: 'en', label: t('common:english') }, { value: 'id', label: t('common:indonesian') },