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

This commit is contained in:
Michael Shamoon
2020-12-19 23:42:08 -08:00
parent 46f778111c
commit 86da578774
4 changed files with 34 additions and 19 deletions

View File

@@ -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) { }