Skip to content

Commit ad87350

Browse files
authored
Merge pull request transloadit#1 from LexPredict/dev
little change
2 parents 7a04e8b + 110a831 commit ad87350

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

packages/@uppy/dashboard/src/components/AddFiles.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,21 @@ class AddFiles extends Component {
77
}
88

99
onFileInputChange = (event) => {
10-
this.props.handleInputChange(event)
10+
const elem = document.getElementsByClassName("uppy-Dashboard-AddFiles-title")[0];
11+
elem.innerHTML = "<div class='uppy-loader'><span class='preloader-label'>Adding files...</span><div class='preloader'></div></div>";
12+
13+
setTimeout(() => {
14+
this.props.handleInputChange(event)
15+
16+
event.target.value = null
17+
}, 100)
1118

1219
// We clear the input after a file is selected, because otherwise
1320
// change event is not fired in Chrome and Safari when a file
1421
// with the same name is selected.
1522
// ___Why not use value="" on <input/> instead?
1623
// Because if we use that method of clearing the input,
1724
// Chrome will not trigger change if we drop the same file twice (Issue #768).
18-
event.target.value = null
1925
}
2026

2127
renderPoweredByUppy () {

0 commit comments

Comments
 (0)