From 7fbdb0fbcbf2ba766a6a37a3532df9ee02e2f6a4 Mon Sep 17 00:00:00 2001 From: Brandon Wortman Date: Wed, 18 Dec 2024 17:55:42 -0500 Subject: [PATCH] #3955 Add autofocus to true for GfPromptDialogComponent, remove unnecessary discardFn and fix type for value to be string. --- .../src/app/core/notification/notification.service.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/client/src/app/core/notification/notification.service.ts b/apps/client/src/app/core/notification/notification.service.ts index 48d2d56c5..4fec0a009 100644 --- a/apps/client/src/app/core/notification/notification.service.ts +++ b/apps/client/src/app/core/notification/notification.service.ts @@ -88,7 +88,7 @@ export class NotificationService { } const dialog = this.matDialog.open(GfPromptDialogComponent, { - autoFocus: false, + autoFocus: true, maxWidth: this.dialogMaxWidth, width: this.dialogWidth }); @@ -101,11 +101,9 @@ export class NotificationService { valueLabel: aParams.valueLabel }); - return dialog.afterClosed().subscribe((value) => { + return dialog.afterClosed().subscribe((value: string) => { if (value !== undefined && isFunction(aParams.confirmFn)) { aParams.confirmFn(value); - } else if (value === 'discard' && isFunction(aParams.discardFn)) { - aParams.discardFn(); } }); }