mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-08 15:55:31 +01:00
Dynamic counts include all pages, hide for "Any"
This commit is contained in:
parent
02875f5a34
commit
c59420581c
6 changed files with 31 additions and 10 deletions
|
|
@ -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
|
||||
},
|
||||
})
|
||||
},
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue