diff --git a/src/lib/dialog/base-dialog.component.ts b/src/lib/dialog/base-dialog.component.ts index 33f5289..21cb7af 100644 --- a/src/lib/dialog/base-dialog.component.ts +++ b/src/lib/dialog/base-dialog.component.ts @@ -6,6 +6,11 @@ import { AutoUnsubscribe, IqserEventTarget } from '../utils'; import { ConfirmOptions } from '../misc'; import { ConfirmationDialogService } from './confirmation-dialog.service'; +export interface SaveOptions { + closeAfterSave?: boolean; + addMembers?: boolean; +} + @Directive() /** * Extend this component when you want to submit the form after pressing enter. @@ -30,7 +35,7 @@ export abstract class BaseDialogComponent extends AutoUnsubscribe implements OnI super(); } - abstract save(closeAfterSave?: boolean): void; + abstract save(options?: SaveOptions): void; ngOnInit(): void { this.addSubscription = this._dialogRef.backdropClick().subscribe(() => { @@ -78,7 +83,7 @@ export abstract class BaseDialogComponent extends AutoUnsubscribe implements OnI this._openConfirmDialog().then(result => { if (result in ConfirmOptions) { if (result === ConfirmOptions.CONFIRM) { - this.save(true); + this.save({ closeAfterSave: true }); } else { this._dialogRef.close(); }