diff --git a/packages/lsd-react/src/components/Dropdown/Dropdown.tsx b/packages/lsd-react/src/components/Dropdown/Dropdown.tsx index dd5a29a..91e0a78 100644 --- a/packages/lsd-react/src/components/Dropdown/Dropdown.tsx +++ b/packages/lsd-react/src/components/Dropdown/Dropdown.tsx @@ -83,10 +83,9 @@ export const Dropdown: React.FC & { handleToggle(!openState) } - // Handle the controlled version of the component: useEffect(() => { - typeof isOpen !== 'undefined' && setOpenState(isOpen) - }, [isOpen]) + if (disabled && openState && !isControlled) setOpenState(false) + }, [openState, disabled, isControlled]) const buttonId = props?.id ?? (props.id || 'dropdown') + '-input'