0">
{{ "bulkCollectionAssignmentWarning" | i18n: totalItemCount : readonlyItemCount }}
diff --git a/libs/vault/src/components/assign-collections.component.ts b/libs/vault/src/components/assign-collections.component.ts
index 5bbe616c63..bff7634dee 100644
--- a/libs/vault/src/components/assign-collections.component.ts
+++ b/libs/vault/src/components/assign-collections.component.ts
@@ -28,6 +28,7 @@ import { CollectionView } from "@bitwarden/common/vault/models/view/collection.v
import {
AsyncActionsModule,
BitSubmitDirective,
+ ButtonComponent,
ButtonModule,
DialogModule,
FormFieldModule,
@@ -86,11 +87,10 @@ export class AssignCollectionsComponent implements OnInit {
@Input() params: CollectionAssignmentParams;
- @Output()
- formLoading = new EventEmitter();
-
- @Output()
- formDisabled = new EventEmitter();
+ /**
+ * Submit button instance that will be disabled or marked as loading when the form is submitting.
+ */
+ @Input() submitBtn?: ButtonComponent;
@Output()
editableItemCountChange = new EventEmitter();
@@ -177,11 +177,19 @@ export class AssignCollectionsComponent implements OnInit {
ngAfterViewInit(): void {
this.bitSubmit.loading$.pipe(takeUntil(this.destroy$)).subscribe((loading) => {
- this.formLoading.emit(loading);
+ if (!this.submitBtn) {
+ return;
+ }
+
+ this.submitBtn.loading = loading;
});
this.bitSubmit.disabled$.pipe(takeUntil(this.destroy$)).subscribe((disabled) => {
- this.formDisabled.emit(disabled);
+ if (!this.submitBtn) {
+ return;
+ }
+
+ this.submitBtn.disabled = disabled;
});
}