From dde6d7bf908d6b274fe50e11cbcc4d44805ed88d Mon Sep 17 00:00:00 2001 From: Claas Augner Date: Fri, 26 Apr 2024 16:38:40 +0200 Subject: [PATCH 1/2] feat(dropdown): add alwaysRenderChildren option --- client/src/app.scss | 4 ++++ client/src/ui/molecules/dropdown/index.tsx | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/client/src/app.scss b/client/src/app.scss index 3926046acbcf..68e73d2291bf 100644 --- a/client/src/app.scss +++ b/client/src/app.scss @@ -186,6 +186,10 @@ main { width: 1px !important; } +.contents { + display: contents; +} + .hidden { display: none; } diff --git a/client/src/ui/molecules/dropdown/index.tsx b/client/src/ui/molecules/dropdown/index.tsx index c3016cea2689..71434abe83d7 100644 --- a/client/src/ui/molecules/dropdown/index.tsx +++ b/client/src/ui/molecules/dropdown/index.tsx @@ -54,9 +54,11 @@ export function DropdownMenuWrapper({ export function DropdownMenu({ children, + alwaysRenderChildren = false, onClose = () => {}, }: { children: React.ReactNode; + alwaysRenderChildren?: boolean; onClose?: (event?: Event) => void; }) { const { isOpen, wrapperRef, close, disableAutoClose } = @@ -82,7 +84,12 @@ export function DropdownMenu({ onClose(event); } }); - if (!isOpen) return null; + + if (alwaysRenderChildren) { + return
{children}
; + } else if (!isOpen) { + return null; + } return <>{children}; } From b59f602af9ae6c375915201913cff6399bdac038 Mon Sep 17 00:00:00 2001 From: Claas Augner Date: Fri, 26 Apr 2024 16:39:29 +0200 Subject: [PATCH 2/2] fix(language-menu): always render links to other locales --- client/src/ui/organisms/article-actions/language-menu/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/ui/organisms/article-actions/language-menu/index.tsx b/client/src/ui/organisms/article-actions/language-menu/index.tsx index ee46ec371ab8..755527d8f77b 100644 --- a/client/src/ui/organisms/article-actions/language-menu/index.tsx +++ b/client/src/ui/organisms/article-actions/language-menu/index.tsx @@ -95,7 +95,7 @@ export function LanguageMenu({ {native} - +