Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ should change the heading of the (upcoming) version to include a major version b
-->
# 6.0.0-beta.15

## @rjsf/core

- Updated `ArrayField` `onSelectChange` to not pass `name` in the `path` since the `ObjectField` will automatically add it [#4733](https://github.com/rjsf-team/react-jsonschema-form/issues/4733)

## @rjsf/semantic-ui

- Updated `ArrayField` to stop using `nanoid` and instead use `lodash/uniqueId` to fix [#4762](https://github.com/rjsf-team/react-jsonschema-form/issues/4726)
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/components/fields/ArrayField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -418,9 +418,9 @@ class ArrayField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends For

/** Callback handler used to change the value for a checkbox */
onSelectChange = (value: any) => {
const { name, onChange, idSchema } = this.props;
// select change will pass the `path` array with the name
onChange(value, [name], undefined, idSchema && idSchema.$id);
const { onChange, idSchema } = this.props;
// select change will pass an empty `path` array since the `ObjectField` will add the path value automatically
onChange(value, [], undefined, idSchema && idSchema.$id);
};

/** Helper method to compute item UI schema for both normal and fixed arrays
Expand Down