@rjsf/core 5.22.0 → 5.22.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rjsf/core",
3
- "version": "5.22.0",
3
+ "version": "5.22.2",
4
4
  "description": "A simple React component capable of building HTML forms out of a JSON schema.",
5
5
  "scripts": {
6
6
  "build:ts": "tsc -b",
@@ -37,7 +37,7 @@
37
37
  "node": ">=14"
38
38
  },
39
39
  "peerDependencies": {
40
- "@rjsf/utils": "^5.20.x",
40
+ "@rjsf/utils": "^5.22.x",
41
41
  "react": "^16.14.0 || >=17"
42
42
  },
43
43
  "dependencies": {
@@ -54,10 +54,10 @@
54
54
  "@babel/preset-env": "^7.23.9",
55
55
  "@babel/preset-react": "^7.23.3",
56
56
  "@babel/preset-typescript": "^7.23.3",
57
- "@rjsf/snapshot-tests": "^5.22.0",
58
- "@rjsf/utils": "^5.22.0",
59
- "@rjsf/validator-ajv6": "^5.22.0",
60
- "@rjsf/validator-ajv8": "^5.22.0",
57
+ "@rjsf/snapshot-tests": "^5.22.2",
58
+ "@rjsf/utils": "^5.22.2",
59
+ "@rjsf/validator-ajv6": "^5.22.2",
60
+ "@rjsf/validator-ajv8": "^5.22.2",
61
61
  "@types/jest": "^29.5.12",
62
62
  "@types/lodash": "^4.14.202",
63
63
  "@types/react": "^18.2.58",
@@ -103,5 +103,5 @@
103
103
  "publishConfig": {
104
104
  "access": "public"
105
105
  },
106
- "gitHead": "3aeb47c9efa76dd449ff813de86616feb7ba7810"
106
+ "gitHead": "3d59cbeee4b551f254a56302a25454dbab9658c9"
107
107
  }
@@ -441,9 +441,9 @@ export default class Form<
441
441
  if (mustValidate) {
442
442
  const schemaValidation = this.validate(formData, schema, schemaUtils, _retrievedSchema);
443
443
  errors = schemaValidation.errors;
444
- // If the schema has changed, we do not merge state.errorSchema.
444
+ // If retrievedSchema is undefined which means the schema or formData has changed, we do not merge state.
445
445
  // Else in the case where it hasn't changed, we merge 'state.errorSchema' with 'schemaValidation.errorSchema.' This done to display the raised field error.
446
- if (isSchemaChanged) {
446
+ if (retrievedSchema === undefined) {
447
447
  errorSchema = schemaValidation.errorSchema;
448
448
  } else {
449
449
  errorSchema = mergeObjects(
@@ -169,7 +169,7 @@ function FileWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends
169
169
  processFiles(event.target.files).then((filesInfoEvent) => {
170
170
  const newValue = filesInfoEvent.map((fileInfo) => fileInfo.dataURL);
171
171
  if (multiple) {
172
- onChange(value.concat(newValue[0]));
172
+ onChange(value.concat(newValue));
173
173
  } else {
174
174
  onChange(newValue[0]);
175
175
  }