zgl 17 timmar sedan
förälder
incheckning
5b5e6b0bda
1 ändrade filer med 7 tillägg och 18 borttagningar
  1. 7 18
      src/app/(public)/customer/address/eidt/[id]/page.tsx

+ 7 - 18
src/app/(public)/customer/address/eidt/[id]/page.tsx

@@ -187,24 +187,13 @@ const CustomerAddressEditPage = () => {
 
               {/* 手机号 */}
               <CustomerAddressPhone />
-              <Controller
-                control={addressForm.control}
-                name="country"
-                rules={{ required: "Country is required" }}
-                render={({ field }) => {
-                  return (
-                    <Select
-                      placeholder="Country/Region"
-                      defaultValue={field.value}
-                      onChange={field.onChange}
-                      onBlur={field.onBlur}
-                      name={field.name}
-                      options={countriesOptions}
-                      error={errors.country?.message as string}
-                    />
-                  );
-                }}
-              />
+              <Select placeholder="Country/Region"
+                  {...register("country", {
+                      required: "Country/Region field is required",
+                  })}
+                  options={countriesOptions}
+                  error={errors.country?.message as string}
+              /> 
               {/* <input {...register("country")} /> */}
               {/* 邮箱 */}
               <div className="mt-4">