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'
|
: 'originals'
|
||||||
this.documentService
|
this.documentService
|
||||||
.bulkDownload(
|
.bulkDownload(
|
||||||
Array.from(this.list.selected),
|
this.list.getSelectedInOrder(),
|
||||||
downloadFileType,
|
downloadFileType,
|
||||||
this.downloadForm.get('downloadAsSingleFile').value,
|
this.downloadForm.get('downloadAsSingleFile').value,
|
||||||
this.downloadForm.get('downloadUseFormatting').value
|
this.downloadForm.get('downloadUseFormatting').value
|
||||||
|
@ -358,6 +358,12 @@ export class DocumentListViewService {
|
|||||||
return this.activeListViewState.selected
|
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) {
|
setSort(field: string, reverse: boolean) {
|
||||||
this.activeListViewState.sortField = field
|
this.activeListViewState.sortField = field
|
||||||
this.activeListViewState.sortReverse = reverse
|
this.activeListViewState.sortReverse = reverse
|
||||||
|
Loading…
x
Reference in New Issue
Block a user