Fix: clear document selection on delete originals

This commit is contained in:
shamoon
2025-02-01 15:41:32 -08:00
parent 046d8456e2
commit bf2c6c4c25
3 changed files with 53 additions and 49 deletions

View File

@@ -1039,6 +1039,7 @@ describe('BulkEditorComponent', () => {
httpTestingController.match(
`${environment.apiBaseUrl}documents/?page=1&page_size=100000&fields=id`
) // listAllFilteredIds
expect(documentListViewService.selected.size).toEqual(0)
})
it('should support bulk download with archive, originals or both and file formatting', () => {

View File

@@ -268,6 +268,9 @@ export class BulkEditorComponent
.pipe(first())
.subscribe({
next: () => {
if (args['delete_originals']) {
this.list.selected.clear()
}
this.list.reload()
this.list.reduceSelectionToFilter()
this.list.selected.forEach((id) => {