1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 14:23:32 +00:00

[PM-9952][PM-9954] Minor assign collection fixes (#10190)

* disable organization selector when only one org is selected

* break long org names in assign collections copy

- applicable more in the browser implementation

* add `title` to each select option so a mouse over presents the name

- more applicable to the browser extension where names can overflow

* truncate options that overflow a select

* set max width of form fields to 100%
This commit is contained in:
Nick Krantz
2024-07-22 09:26:38 -05:00
committed by GitHub
parent 0e51695078
commit 8a86a699ff
3 changed files with 11 additions and 6 deletions

View File

@@ -123,6 +123,11 @@ export class AssignCollectionsComponent implements OnInit {
setTimeout(() => {
this.formGroup.patchValue({ selectedOrg: orgs[0].id });
this.setFormValidators();
// Disable the org selector if there is only one organization
if (orgs.length === 1) {
this.formGroup.controls.selectedOrg.disable();
}
});
}
}),
@@ -139,7 +144,7 @@ export class AssignCollectionsComponent implements OnInit {
// Get the selected organization ID. If the user has not selected an organization from the form,
// fallback to use the organization ID from the params.
private get selectedOrgId(): OrganizationId {
return this.formGroup.value.selectedOrg || this.params.organizationId;
return this.formGroup.getRawValue().selectedOrg || this.params.organizationId;
}
private destroy$ = new Subject<void>();