diff --git a/src/angular/components/groupings.component.ts b/src/angular/components/groupings.component.ts index 4643f3490b..f5b7e7f494 100644 --- a/src/angular/components/groupings.component.ts +++ b/src/angular/components/groupings.component.ts @@ -16,8 +16,9 @@ import { FolderService } from '../../abstractions/folder.service'; export class GroupingsComponent { @Input() showFolders = true; - @Input() loadNestedFolder = false; + @Input() loadNestedFolders = false; @Input() showCollections = true; + @Input() loadNestedCollections = false; @Input() showFavorites = true; @Output() onAllClicked = new EventEmitter(); @@ -31,6 +32,7 @@ export class GroupingsComponent { folders: FolderView[]; nestedFolders: Array>; collections: CollectionView[]; + nestedCollections: Array>; loaded: boolean = false; cipherType = CipherType; selectedAll: boolean = false; @@ -61,6 +63,9 @@ export class GroupingsComponent { } else { this.collections = collections; } + if (this.loadNestedCollections) { + this.nestedCollections = await this.collectionService.getAllNested(this.collections); + } } async loadFolders() { @@ -68,7 +73,7 @@ export class GroupingsComponent { return; } this.folders = await this.folderService.getAllDecrypted(); - if (this.loadNestedFolder) { + if (this.loadNestedFolders) { this.nestedFolders = await this.folderService.getAllNested(); } }