mui-custom-form 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -189,7 +189,7 @@ const Fields = z.object({
189
189
  .array(z.enum(HOBBIES), { required_error: "Hobbies are required" })
190
190
  .nonempty("Please choose at least one hobby"),
191
191
  birthDate: z.date({ required_error: "Birthdate is required" }),
192
- file: z.instanceof(File).optional(),
192
+ file: z.instanceof(FileList).optional(),
193
193
  });
194
194
 
195
195
  type FieldTypes = z.infer<typeof Fields>;
@@ -76,7 +76,7 @@ var CustomForm = function (_a) {
76
76
  "Upload File",
77
77
  react_1.default.createElement("input", __assign({ type: "file", hidden: true, onChange: function (e) {
78
78
  var fileValue = e.target.files && e.target.files.length > 0
79
- ? e.target.files[0]
79
+ ? e.target.files
80
80
  : undefined;
81
81
  setValue(field.name, fileValue);
82
82
  } }, field.otherProps)))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mui-custom-form",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "A versatile React form component utilizing MUI components and react-hook-form.",
5
5
  "main": "dist/CustomForm.js",
6
6
  "types": "dist/CustomForm.d.ts",