]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Include excluded items in dropdown count 263/head
authorMichael Shamoon <4887959+shamoon@users.noreply.github.com>
Fri, 11 Mar 2022 09:17:19 +0000 (01:17 -0800)
committerMichael Shamoon <4887959+shamoon@users.noreply.github.com>
Fri, 11 Mar 2022 09:17:19 +0000 (01:17 -0800)
src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html
src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts

index babf2558824c4e63ed19df84e88a9e8dc20d6d9e..b79862bf13e278d628eb74d6363648704c1c5461 100644 (file)
@@ -6,7 +6,7 @@
     <div class="d-none d-sm-inline">&nbsp;{{title}}</div>
     <ng-container *ngIf="!editing && selectionModel.selectionSize() > 0">
       <div *ngIf="multiple" class="position-absolute top-0 start-100 translate-middle badge bg-secondary border border-light text-light rounded-pill">
-        {{selectionModel.selectionSize()}}<span class="visually-hidden">selected</span>
+        {{selectionModel.totalCount}}<span class="visually-hidden">selected</span>
       </div>
       <div *ngIf="!multiple" class="position-absolute top-0 start-100 p-2 translate-middle badge bg-secondary border border-light rounded-circle">
         <span class="visually-hidden">selected</span>
index c3b4c890ba4553f9577516ca5d2cb3b399bf746e..27b04d08b1930bb6a5b018147850df041bafee24 100644 (file)
@@ -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'