diff --git a/apps/scandic-web/components/TempDesignSystem/Form/Country/index.tsx b/apps/scandic-web/components/TempDesignSystem/Form/Country/index.tsx index 2ed0e1669..58ffb7964 100644 --- a/apps/scandic-web/components/TempDesignSystem/Form/Country/index.tsx +++ b/apps/scandic-web/components/TempDesignSystem/Form/Country/index.tsx @@ -27,7 +27,7 @@ export default function CountrySelect({ const { startsWith } = useFilter({ sensitivity: "base" }) const [filterValue, setFilterValue] = useState("") - const { control } = useFormContext() + const { control, setValue } = useFormContext() const { field, formState, fieldState } = useController({ control, name, @@ -57,7 +57,8 @@ export default function CountrySelect({ isInvalid={fieldState.invalid} name={field.name} onBlur={field.onBlur} - defaultSelectedKey={field.value} + onSelectionChange={(country) => setValue(name, country ?? "")} + selectedKey={field.value} data-testid={name} isReadOnly={readOnly} onInputChange={setFilterValue}