Add "all" property to results

This commit is contained in:
shamoon
2023-05-06 09:54:45 -07:00
parent bd1f9acc62
commit ab78b98d6a
4 changed files with 80 additions and 13 deletions

View File

@@ -2,4 +2,6 @@ export interface Results<T> {
count: number
results: T[]
all: number[]
}

View File

@@ -230,21 +230,14 @@ export class DocumentListViewService {
activeListViewState.documents = result.results
this.documentService
.listAllFilteredIds(activeListViewState.filterRules)
.getSelectionData(result.all)
.pipe(first())
.subscribe({
next: (ids: number[]) => {
this.documentService
.getSelectionData(ids)
.pipe(first())
.subscribe({
next: (selectionData) => {
this.selectionData = selectionData
},
error: () => {
this.selectionData = null
},
})
next: (selectionData) => {
this.selectionData = selectionData
},
error: () => {
this.selectionData = null
},
})