From: Michael Shamoon <4887959+shamoon@users.noreply.github.com>
Date: Fri, 11 Mar 2022 09:17:19 +0000 (-0800)
Subject: Include excluded items in dropdown count
X-Git-Tag: beta-1.6.1~113^2
X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F263%2Fhead;p=thirdparty%2Fpaperless-ngx.git
Include excluded items in dropdown count
---
diff --git a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html
index babf255882..b79862bf13 100644
--- a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html
+++ b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html
@@ -6,7 +6,7 @@
{{title}}
0">
- {{selectionModel.selectionSize()}}selected
+ {{selectionModel.totalCount}}selected
selected
diff --git a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts
index c3b4c890ba..27b04d08b1 100644
--- a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts
+++ b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts
@@ -137,6 +137,10 @@ export class FilterableDropdownSelectionModel {
return this.getSelectedItems().length
}
+ get totalCount() {
+ return this.getSelectedItems().length + this.getExcludedItems().length
+ }
+
clear(fireEvent = true) {
this.temporarySelectionStates.clear()
this.temporaryLogicalOperator = this._logicalOperator = 'and'