fix: Country Dropdown not closing with AddressInput (#8147)
## Description - This PR fixes #8080 - The Country Selector dropdown closes with Address Input `clickOutside` function ## Changes https://github.com/user-attachments/assets/1ab85175-9ce9-40d2-ac52-14bfe87e254f --------- Co-authored-by: Devessier <baptiste@devessier.fr>
This commit is contained in:
@ -70,6 +70,7 @@ export const Dropdown = ({
|
||||
closeDropdown,
|
||||
dropdownWidth,
|
||||
setDropdownPlacement,
|
||||
resetDropdown,
|
||||
} = useDropdown(dropdownId);
|
||||
|
||||
const offsetMiddlewares = [];
|
||||
@ -130,6 +131,12 @@ export const Dropdown = ({
|
||||
[closeDropdown],
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
resetDropdown();
|
||||
};
|
||||
}, [resetDropdown]);
|
||||
|
||||
return (
|
||||
<DropdownScope dropdownScopeId={getScopeIdFromComponentId(dropdownId)}>
|
||||
<div ref={containerRef} className={className}>
|
||||
|
||||
Reference in New Issue
Block a user