mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-23 12:02:10 +03:00
fix: dropdown menu doesn't close and remains open (#8302)
## Description - Fixes #8285 - Added fix for both Currency and PhoneCountry dropdown ## Changes https://github.com/user-attachments/assets/cbf85100-7791-40da-a676-2c87c6a32976 --------- Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
parent
045f569d62
commit
0381996fb9
@ -35,7 +35,12 @@ export const MultiItemFieldMenuItem = <T,>({
|
||||
const { isDropdownOpen, closeDropdown } = useDropdown(dropdownId);
|
||||
|
||||
const handleMouseEnter = () => setIsHovered(true);
|
||||
const handleMouseLeave = () => setIsHovered(false);
|
||||
const handleMouseLeave = () => {
|
||||
setIsHovered(false);
|
||||
if (isDropdownOpen) {
|
||||
closeDropdown();
|
||||
}
|
||||
};
|
||||
|
||||
const handleDeleteClick = () => {
|
||||
closeDropdown();
|
||||
|
@ -1,3 +1,3 @@
|
||||
export enum CurrencyPickerHotkeyScope {
|
||||
CurrencyPicker = 'currency-picker',
|
||||
CurrencyPicker = 'currency-picker-dropdown-id',
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ export const PhoneCountryPickerDropdownButton = ({
|
||||
const [selectedCountry, setSelectedCountry] = useState<Country>();
|
||||
|
||||
const { isDropdownOpen, closeDropdown } = useDropdown(
|
||||
CountryPickerHotkeyScope.CountryPicker,
|
||||
'country-picker-dropdown-id',
|
||||
);
|
||||
|
||||
const handleChange = (countryCode: string) => {
|
||||
|
Loading…
Reference in New Issue
Block a user