Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ should change the heading of the (upcoming) version to include a major version b
## @rjsf/core

- Updated `MultiSchemaField` to call the `onChange` handler after setting the new option, fixing [#3997](https://github.com/rjsf-team/react-jsonschema-form/issues/3977) and [#4314](https://github.com/rjsf-team/react-jsonschema-form/issues/4314)
- Fix an issue where only the first file was uploaded when users selected multiple files for upload.

## @rjsf/utils

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/widgets/FileWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ function FileWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends
processFiles(event.target.files).then((filesInfoEvent) => {
const newValue = filesInfoEvent.map((fileInfo) => fileInfo.dataURL);
if (multiple) {
onChange(value.concat(newValue[0]));
onChange(value.concat(newValue));
} else {
onChange(newValue[0]);
}
Expand Down