mirror of https://github.com/acid-info/lsd.git
fix: removed the incorrect useEffect and updated deps array
This commit is contained in:
parent
101b00633f
commit
90e9c6ac7a
|
@ -83,10 +83,9 @@ export const Dropdown: React.FC<DropdownProps> & {
|
|||
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'
|
||||
|
||||
|
|
Loading…
Reference in New Issue