From b065db4b5b507931daea159252e625f7f425c693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Fri, 2 Oct 2026 10:46:32 +0200 Subject: [PATCH] fix first render not working --- client/components/dropdown/dropdown.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/components/dropdown/dropdown.jsx b/client/components/dropdown/dropdown.jsx index 1949e0093..f87fc9a46 100644 --- a/client/components/dropdown/dropdown.jsx +++ b/client/components/dropdown/dropdown.jsx @@ -22,7 +22,7 @@ import _ from 'lodash'; // use react context to keep track of the menu depth (menus in menus) const MenuDepthContext = React.createContext(0); -const Dropdown = ({ groupName, className = null, icon, children, color = null, customTrigger, disabled, ...props })=>{ +const Dropdown = ({ groupName, className = null, icon, children, color = null, customTrigger, disabled = false, ...props })=>{ const reactId = useId(); const safeId = reactId.replace(/[^a-zA-Z0-9_-]/g, ''); const menuId = `${_.kebabCase(groupName)}-${safeId}-menu`; @@ -41,7 +41,7 @@ const Dropdown = ({ groupName, className = null, icon, children, color = null, c useEffect(()=>{ triggerRef.current?.setAttribute('style', `anchor-name: ${anchorName}`); menuRef.current?.setAttribute('style', `position-anchor: ${anchorName}`); - }, [anchorName]); + }, [anchorName, disabled]); // hide popover with click inside iframe (not supported by light dismiss) useEffect(()=>{