better handling for multiple separate uploads

This commit is contained in:
Martina 2020-09-10 16:06:06 -07:00
parent afaf30870e
commit f972e1e535
2 changed files with 6 additions and 2 deletions

View File

@ -124,6 +124,11 @@ export default class ApplicationPage extends React.Component {
};
_handleRegisterFileLoading = ({ fileLoading }) => {
if (this.state.fileLoading) {
return this.setState({
fileLoading: { ...this.state.fileLoading, ...fileLoading },
});
}
return this.setState({
fileLoading,
});

View File

@ -95,7 +95,7 @@ export default class SidebarAddFileToBucket extends React.Component {
if (!files.length) {
alert("We could not find any files to upload.");
return this.props.onRegisterFileLoading({ fileLoading: null });
// return this.props.onRegisterFileLoading({ fileLoading: null });
}
this.props.onRegisterFileLoading({ fileLoading });
@ -146,7 +146,6 @@ export default class SidebarAddFileToBucket extends React.Component {
return total + curr.total;
}, 0);
}
console.log(this.props.fileLoading);
return (
<React.Fragment>
<System.P