mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-30 18:27:45 -05:00
Dynamic counts include all pages, hide for "Any"
This commit is contained in:
@@ -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
|
||||
},
|
||||
})
|
||||
},
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user