Skip to content

Commit 82f6749

Browse files
Fix 4733 by fixing the ArrayField.onSelectChange function
Fixes #4733 by fixing how the `ArrayField.onSelectChange()` callback passes the path - Updated `ArrayField` `onSelectChange` to not pass `name` in the `path` since the `ObjectField` will automatically add it - Updated the `CHANGELOG.md` accordingly
1 parent 3573065 commit 82f6749

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/core/src/components/fields/ArrayField.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,9 +418,9 @@ class ArrayField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends For
418418

419419
/** Callback handler used to change the value for a checkbox */
420420
onSelectChange = (value: any) => {
421-
const { name, onChange, idSchema } = this.props;
421+
const { onChange, idSchema } = this.props;
422422
// select change will pass the `path` array with the name
423-
onChange(value, [name], undefined, idSchema && idSchema.$id);
423+
onChange(value, [], undefined, idSchema && idSchema.$id);
424424
};
425425

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

0 commit comments

Comments
 (0)