1
0
mirror of https://github.com/bitwarden/web synced 2026-01-20 17:33:17 +00:00

unassigned collection filtering

This commit is contained in:
Kyle Spearrin
2018-07-03 23:43:57 -04:00
parent 3c45e7dac9
commit db43f817f7
3 changed files with 19 additions and 3 deletions

View File

@@ -92,7 +92,13 @@ export class VaultComponent implements OnInit {
async filterCollection(collectionId: string, load = false) {
this.groupingsComponent.searchPlaceholder = this.i18nService.t('searchCollection');
const filter = (c: CipherView) => c.collectionIds.indexOf(collectionId) > -1;
const filter = (c: CipherView) => {
if (collectionId === 'unassigned') {
return c.collectionIds == null || c.collectionIds.length === 0;
} else {
return c.collectionIds.indexOf(collectionId) > -1;
}
};
if (load) {
await this.ciphersComponent.load(filter);
} else {