Browse Source

#3955 Add autofocus to true for GfPromptDialogComponent, remove unnecessary discardFn and fix type for value to be string.

pull/4117/head
Brandon Wortman 8 months ago
parent
commit
7fbdb0fbcb
No known key found for this signature in database GPG Key ID: C63DB7DA05AEC086
  1. 6
      apps/client/src/app/core/notification/notification.service.ts

6
apps/client/src/app/core/notification/notification.service.ts

@ -88,7 +88,7 @@ export class NotificationService {
} }
const dialog = this.matDialog.open(GfPromptDialogComponent, { const dialog = this.matDialog.open(GfPromptDialogComponent, {
autoFocus: false, autoFocus: true,
maxWidth: this.dialogMaxWidth, maxWidth: this.dialogMaxWidth,
width: this.dialogWidth width: this.dialogWidth
}); });
@ -101,11 +101,9 @@ export class NotificationService {
valueLabel: aParams.valueLabel valueLabel: aParams.valueLabel
}); });
return dialog.afterClosed().subscribe((value) => { return dialog.afterClosed().subscribe((value: string) => {
if (value !== undefined && isFunction(aParams.confirmFn)) { if (value !== undefined && isFunction(aParams.confirmFn)) {
aParams.confirmFn(value); aParams.confirmFn(value);
} else if (value === 'discard' && isFunction(aParams.discardFn)) {
aParams.discardFn();
} }
}); });
} }

Loading…
Cancel
Save