@rjsf/core 6.4.1 → 6.4.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.
@@ -324,7 +324,7 @@ export default class Form extends Component {
324
324
  errors = merged.errors;
325
325
  }
326
326
  if (customErrors) {
327
- const merged = validationDataMerge(schemaValidation, customErrors.ErrorSchema, true);
327
+ const merged = validationDataMerge({ errors, errorSchema }, customErrors.ErrorSchema, true);
328
328
  errorSchema = merged.errorSchema;
329
329
  errors = merged.errors;
330
330
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ArrayField.d.ts","sourceRoot":"","sources":["../../../src/components/fields/ArrayField.tsx"],"names":[],"mappings":"AACA,OAAO,EAmBL,UAAU,EACV,eAAe,EAEf,UAAU,EACV,gBAAgB,EAIjB,MAAM,aAAa,CAAC;AAwzBrB;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAClH,KAAK,EAAE,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,2CAkP7B"}
1
+ {"version":3,"file":"ArrayField.d.ts","sourceRoot":"","sources":["../../../src/components/fields/ArrayField.tsx"],"names":[],"mappings":"AACA,OAAO,EAmBL,UAAU,EACV,eAAe,EAEf,UAAU,EACV,gBAAgB,EAIjB,MAAM,aAAa,CAAC;AA4zBrB;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,gBAAgB,GAAG,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,GAAG,EAClH,KAAK,EAAE,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,2CAkP7B"}
@@ -125,7 +125,9 @@ function ArrayAsMultiSelect(props) {
125
125
  const { schema, fieldPathId, uiSchema, formData: items = [], disabled = false, readonly = false, autofocus = false, required = false, placeholder, onBlur, onFocus, registry, rawErrors, name, onSelectChange, } = props;
126
126
  const { widgets, schemaUtils, globalFormOptions, globalUiOptions } = registry;
127
127
  const itemsSchema = schemaUtils.retrieveSchema(schema.items, items);
128
- const itemsUiSchema = (uiSchema?.items ?? {});
128
+ // For computing `enumOptions`, fallback to the array property's uiSchema if there is no `items` schema
129
+ // Avoids a breaking change reported in https://github.com/rjsf-team/react-jsonschema-form/issues/4985
130
+ const itemsUiSchema = (uiSchema?.items ?? uiSchema);
129
131
  const enumOptions = optionsList(itemsSchema, itemsUiSchema);
130
132
  const { widget = 'select', title: uiTitle, ...options } = getUiOptions(uiSchema, globalUiOptions);
131
133
  const Widget = getWidget(schema, widget, widgets);
@@ -271,6 +273,7 @@ function NormalArray(props) {
271
273
  name: name && `${name}-${index}`,
272
274
  registry,
273
275
  uiOptions,
276
+ parentUiSchema: uiSchema,
274
277
  hideError,
275
278
  readonly,
276
279
  disabled,
@@ -381,6 +384,7 @@ function FixedArray(props) {
381
384
  name: name && `${name}-${index}`,
382
385
  registry,
383
386
  uiOptions,
387
+ parentUiSchema: uiSchema,
384
388
  hideError,
385
389
  readonly,
386
390
  disabled,