mirror of
https://github.com/strapi/strapi.git
synced 2025-12-27 15:13:21 +00:00
fix(multiple-files-cancel): discard action if canceled select file
This commit is contained in:
parent
d4c2cb1009
commit
d266961881
@ -38,6 +38,10 @@ class InputFile extends React.Component {
|
||||
handleChange = ({ target }) => this.addFilesToProps(target.files);
|
||||
|
||||
addFilesToProps = (files) => {
|
||||
if (files.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const initAcc = this.props.multiple ? cloneDeep(this.props.value) : {};
|
||||
const value = Object.keys(files).reduce((acc, current) => {
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user