From b014d9360322a480b5270acfdf81f3dbcfe4b426 Mon Sep 17 00:00:00 2001 From: Sacha Al Himdani Date: Tue, 14 Oct 2025 14:58:54 +0200 Subject: [PATCH] Fix vendor page Signed-off-by: Sacha Al Himdani --- apps/console/src/components/form/CountriesField.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/console/src/components/form/CountriesField.tsx b/apps/console/src/components/form/CountriesField.tsx index 9648552db..13c8ab873 100644 --- a/apps/console/src/components/form/CountriesField.tsx +++ b/apps/console/src/components/form/CountriesField.tsx @@ -1,5 +1,5 @@ import { useTranslate } from "@probo/i18n"; -import { useRef, useState } from "react"; +import { useEffect, useRef, useState } from "react"; import { Badge, Input, IconCrossLargeX } from "@probo/ui"; import { type Control, Controller, type FieldPath, type FieldValues } from "react-hook-form"; import { getCountryName, getCountryOptions, countries, type CountryCode } from "@probo/helpers"; @@ -98,6 +98,13 @@ function CountryInput({ availableCountries, onAdd }: CountryInputProps) { const [isOpen, setIsOpen] = useState(false); const countryOptions = getCountryOptions(__); + useEffect(() => { + document.body.style.overflow = isOpen ? "hidden" : ""; + return () => { + document.body.style.overflow = ""; + }; + }, [isOpen]); + const filteredCountries = countryOptions .filter((option: { value: string; label: string }) => availableCountries.includes(option.value as CountryCode)) .filter((option: { value: string; label: string }) =>