From 963837ef1dc6e2e84fcf924606ce388ac30f3891 Mon Sep 17 00:00:00 2001 From: Ramires Viana <59319979+ramiresviana@users.noreply.github.com> Date: Thu, 16 Jan 2020 12:55:25 +0000 Subject: [PATCH] fix: multiple selection count - Only add files to selected list that arent on it. - Only shift key select when there are selected files. --- frontend/src/components/files/ListingItem.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/files/ListingItem.vue b/frontend/src/components/files/ListingItem.vue index 81e97973..7826d49a 100644 --- a/frontend/src/components/files/ListingItem.vue +++ b/frontend/src/components/files/ListingItem.vue @@ -132,7 +132,7 @@ export default { return } - if (event.shiftKey) { + if (event.shiftKey && this.selected.length > 0) { let fi = 0 let la = 0 @@ -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