Revert "fix: Country Dropdown not closing with AddressInput " (#8174)

Reverts twentyhq/twenty#8147
This commit is contained in:
Baptiste Devessier
2024-10-29 15:55:18 +01:00
committed by GitHub
parent 31ecaf2a0d
commit d887a857ca
3 changed files with 9 additions and 19 deletions

View File

@ -1,4 +1,4 @@
import { useRecoilCallback, useRecoilState } from 'recoil';
import { useRecoilState } from 'recoil';
import { useDropdownStates } from '@/ui/layout/dropdown/hooks/internal/useDropdownStates';
import { usePreviousHotkeyScope } from '@/ui/utilities/hotkey/hooks/usePreviousHotkeyScope';
@ -56,16 +56,6 @@ export const useDropdown = (dropdownId?: string) => {
}
};
const resetDropdown = useRecoilCallback(
({ reset }) =>
() => {
reset(dropdownHotkeyScopeState);
reset(dropdownWidthState);
reset(isDropdownOpenState);
},
[dropdownHotkeyScopeState, dropdownWidthState, isDropdownOpenState],
);
return {
scopeId,
isDropdownOpen,
@ -76,6 +66,5 @@ export const useDropdown = (dropdownId?: string) => {
setDropdownWidth,
dropdownPlacement,
setDropdownPlacement,
resetDropdown,
};
};