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 +1 -1
- package/dist/CustomForm.js +1 -1
- package/package.json +1 -1
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(
|
|
192
|
+
file: z.instanceof(FileList).optional(),
|
|
193
193
|
});
|
|
194
194
|
|
|
195
195
|
type FieldTypes = z.infer<typeof Fields>;
|
package/dist/CustomForm.js
CHANGED
|
@@ -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
|
|
79
|
+
? e.target.files
|
|
80
80
|
: undefined;
|
|
81
81
|
setValue(field.name, fileValue);
|
|
82
82
|
} }, field.otherProps)))));
|
package/package.json
CHANGED