ud-components 0.5.8 → 0.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2529,6 +2529,13 @@ class ModalComponent {
|
|
|
2529
2529
|
this.showClose = this.data.showClose;
|
|
2530
2530
|
}
|
|
2531
2531
|
close() {
|
|
2532
|
+
// If the caller is listening on (cancel) they own the close lifecycle —
|
|
2533
|
+
// emit and let them decide. Otherwise fall back to auto-closing the
|
|
2534
|
+
// injected MatDialogRef so the legacy data-callback API keeps working.
|
|
2535
|
+
if (this.cancel.observed) {
|
|
2536
|
+
this.cancel.emit();
|
|
2537
|
+
return;
|
|
2538
|
+
}
|
|
2532
2539
|
this.cancel.emit();
|
|
2533
2540
|
this.dialogRef?.close();
|
|
2534
2541
|
}
|
|
@@ -2539,6 +2546,10 @@ class ModalComponent {
|
|
|
2539
2546
|
else {
|
|
2540
2547
|
this.data.confirm?.();
|
|
2541
2548
|
}
|
|
2549
|
+
if (this.confirm.observed) {
|
|
2550
|
+
this.confirm.emit();
|
|
2551
|
+
return;
|
|
2552
|
+
}
|
|
2542
2553
|
this.confirm.emit();
|
|
2543
2554
|
this.dialogRef?.close();
|
|
2544
2555
|
}
|