Dynamic counts include all pages, hide for "Any"

This commit is contained in:
shamoon
2023-05-05 01:01:57 -07:00
parent ccba2e32e1
commit bd1f9acc62
6 changed files with 31 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core'
import { ParamMap, Router } from '@angular/router'
import { Observable } from 'rxjs'
import { Observable, first } from 'rxjs'
import {
filterRulesDiffer,
cloneFilterRules,
@@ -230,13 +230,21 @@ export class DocumentListViewService {
activeListViewState.documents = result.results
this.documentService
.getSelectionData(result.results.map((d) => d.id))
.listAllFilteredIds(activeListViewState.filterRules)
.pipe(first())
.subscribe({
next: (selectionData) => {
this.selectionData = selectionData
},
error: () => {
this.selectionData = null
next: (ids: number[]) => {
this.documentService
.getSelectionData(ids)
.pipe(first())
.subscribe({
next: (selectionData) => {
this.selectionData = selectionData
},
error: () => {
this.selectionData = null
},
})
},
})