1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +00:00

[PM-1433] Creating Item Doesn't Auto-Select Current Organization/Collection in Individual Web Vault (#5302)

This commit is contained in:
Cesar Gonzalez
2023-05-01 10:07:57 -05:00
committed by GitHub
parent 01c1bd0710
commit de078c4bcd

View File

@@ -45,7 +45,7 @@ import { OrganizationService } from "@bitwarden/common/admin-console/abstraction
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
import { CollectionView } from "@bitwarden/common/admin-console/models/view/collection.view";
import { TokenService } from "@bitwarden/common/auth/abstractions/token.service";
import { KdfType, DEFAULT_PBKDF2_ITERATIONS, EventType } from "@bitwarden/common/enums";
import { DEFAULT_PBKDF2_ITERATIONS, EventType, KdfType } from "@bitwarden/common/enums";
import { ServiceUtils } from "@bitwarden/common/misc/serviceUtils";
import { Utils } from "@bitwarden/common/misc/utils";
import { TreeNode } from "@bitwarden/common/models/domain/tree-node";
@@ -585,6 +585,9 @@ export class VaultComponent implements OnInit, OnDestroy {
}
const selectedColId = this.activeFilter.collectionId;
if (selectedColId !== "AllCollections") {
component.organizationId = component.collections.find(
(collection) => collection.id === selectedColId
)?.organizationId;
component.collectionIds = [selectedColId];
}
component.folderId = this.activeFilter.folderId;