Skip to content

Commit

Permalink
fix: multiple selection count
Browse files Browse the repository at this point in the history
- Only add files to selected list that arent on it.
- Only shift key select when there are selected files.
  • Loading branch information
ramiresviana committed Jun 17, 2020
1 parent 66863b7 commit 963837e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/src/components/files/ListingItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export default {
return
}
if (event.shiftKey) {
if (event.shiftKey && this.selected.length > 0) {
let fi = 0
let la = 0
Expand All @@ -145,7 +145,9 @@ export default {
}
for (; fi <= la; fi++) {
this.addSelected(fi)
if (this.$store.state.selected.indexOf(fi) == -1) {
this.addSelected(fi)
}
}
return
Expand Down

0 comments on commit 963837e

Please sign in to comment.