Skip to content
Snippets Groups Projects
Verified Commit a3a7ec08 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Fix #716: constant and unpredictable reordering during file upload

parent 99b8ef2d
No related branches found
No related tags found
No related merge requests found
Fixed constant and unpredictable reordering during file upload (#716)
......@@ -279,15 +279,18 @@ export default {
},
sortedFiles() {
// return errored files on top
return this.files.sort(f => {
return _.sortBy(this.files.map(f => {
let statusIndex = 0
if (f.errored) {
return -5;
statusIndex = -1
}
if (f.success) {
return 5;
statusIndex = 1
}
return 0;
});
f.statusIndex = statusIndex
return f
}), ['statusIndex', 'name'])
}
},
watch: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment