diff --git a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown-button/filterable-dropdown-button.component.html b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown-button/filterable-dropdown-button.component.html
index 5b58025d1..75dadba53 100644
--- a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown-button/filterable-dropdown-button.component.html
+++ b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown-button/filterable-dropdown-button.component.html
@@ -5,8 +5,8 @@
-
-
{{item.name}}
+
+
{{toggleableItem?.item.name}}
- {{item.document_count}}
+ {{toggleableItem?.item.document_count}}
diff --git a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown-button/filterable-dropdown-button.component.ts b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown-button/filterable-dropdown-button.component.ts
index b0ced21cc..3486bdb46 100644
--- a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown-button/filterable-dropdown-button.component.ts
+++ b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown-button/filterable-dropdown-button.component.ts
@@ -9,22 +9,16 @@ import { ToggleableItem, ToggleableItemState } from '../filterable-dropdown.comp
templateUrl: './filterable-dropdown-button.component.html',
styleUrls: ['./filterable-dropdown-button.component.scss']
})
-export class FilterableDropdownButtonComponent implements OnInit {
+export class FilterableDropdownButtonComponent {
@Input()
toggleableItem: ToggleableItem
- get item(): PaperlessTag | PaperlessDocumentType | PaperlessCorrespondent {
- return this.toggleableItem?.item
- }
-
@Output()
toggle = new EventEmitter()
- isTag: boolean
-
- ngOnInit() {
- this.isTag = 'is_inbox_tag' in this.item // ~ this.item instanceof PaperlessTag
+ get isTag(): boolean {
+ return 'is_inbox_tag' in this.toggleableItem?.item // ~ this.item instanceof PaperlessTag
}
toggleItem(): void {