Hide toggled state & counts when selection spans documents not in view

This commit is contained in:
Michael Shamoon committed 2020-12-19 23:42:08 -08:00
1 parent 46f778111c
commit 86da578774
4 files changed
+34 -19

No files matched your search

@@ -78,8 +78,15 @@ export class FilterableDropdownComponent {
@Output()
editingComplete = new EventEmitter()
_showCounts: boolean = true
@Input
set showCounts(show: boolean) {
this._showCounts = show
}
get showCounts(): boolean {
return this.type == FilterableDropdownType.Editing || (this.type == FilterableDropdownType.Filtering && this.itemsSelected == 0)
return this._showCounts && (this.type == FilterableDropdownType.Editing || (this.type == FilterableDropdownType.Filtering && this.itemsSelected == 0))
}
constructor(private filterPipe: FilterPipe) { }