IDs passed to bulkDownload are sorted in the same order as documents in the view
This commit is contained in:
parent
e52c7e83f3
commit
cec58a9cbc
@ -511,7 +511,7 @@ export class BulkEditorComponent
|
||||
: 'originals'
|
||||
this.documentService
|
||||
.bulkDownload(
|
||||
Array.from(this.list.selected),
|
||||
this.list.getSelectedInOrder(),
|
||||
downloadFileType,
|
||||
this.downloadForm.get('downloadAsSingleFile').value,
|
||||
this.downloadForm.get('downloadUseFormatting').value
|
||||
|
@ -358,6 +358,12 @@ export class DocumentListViewService {
|
||||
return this.activeListViewState.selected
|
||||
}
|
||||
|
||||
getSelectedInOrder(): number[] {
|
||||
return this.activeListViewState.documents
|
||||
.filter((item) => this.activeListViewState.selected.has(item.id))
|
||||
.map((item) => item.id)
|
||||
}
|
||||
|
||||
setSort(field: string, reverse: boolean) {
|
||||
this.activeListViewState.sortField = field
|
||||
this.activeListViewState.sortReverse = reverse
|
||||
|
Loading…
x
Reference in New Issue
Block a user