Refactor selection functions to two separate ones for clarity

This commit is contained in:
Michael Shamoon
2021-01-15 01:59:29 -08:00
parent cf3d6971a8
commit b1ecac73fe
2 changed files with 12 additions and 11 deletions

View File

@@ -161,7 +161,8 @@ export class DocumentListComponent implements OnInit {
}
toggleSelected(document: PaperlessDocument, event: MouseEvent): void {
this.list.toggleSelected(document, event.shiftKey)
if (!event.shiftKey) this.list.toggleSelected(document)
else this.list.selectRangeTo(document)
}
clickTag(tagID: number) {