@firestitch/form 13.3.6 → 13.3.7

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.
@@ -694,36 +694,34 @@ class FsFormDirective {
694
694
  };
695
695
  }
696
696
  confirmTabGroup._handlClick$
697
- .pipe(takeUntil(this._destroy$))
698
- .subscribe((event) => {
699
- if (!this.submitting) {
700
- if (this.confirm && this.confirmTabs) {
701
- this.triggerConfirm()
702
- .pipe(takeUntil(this._destroy$))
703
- .subscribe((result) => {
704
- if (confirmResultContinue(result)) {
705
- confirmTabGroup.selectedIndex = event.idx;
706
- }
707
- });
708
- }
709
- else {
710
- confirmTabGroup._originalHandleClick(event.tab, event.tabHeader, event.idx);
711
- }
697
+ .pipe(filter(() => !this.submitting), switchMap((event) => {
698
+ if (this.confirm && this.confirmTabs) {
699
+ return this.triggerConfirm()
700
+ .pipe(tap((result) => {
701
+ if (confirmResultContinue(result)) {
702
+ confirmTabGroup.selectedIndex = event.idx;
703
+ }
704
+ }));
712
705
  }
713
- });
706
+ confirmTabGroup._originalHandleClick(event.tab, event.tabHeader, event.idx);
707
+ return of(null);
708
+ }), takeUntil(this._destroy$))
709
+ .subscribe();
714
710
  }
715
711
  _registerConfirmDialogBackdropEscape() {
716
- this._dialogBackdropEscape = !this._dialogRef?.disableClose;
717
- if (this._dialogBackdropEscape) {
718
- this._dialogRef.backdropClick()
719
- .pipe(takeUntil(this._destroy$))
720
- .subscribe(() => {
721
- this._formClose();
722
- });
723
- this._destroy$
724
- .subscribe(() => {
725
- this._dialogRef.disableClose = false;
726
- });
712
+ if (this._dialogRef) {
713
+ this._dialogBackdropEscape = !this._dialogRef?.disableClose;
714
+ if (this._dialogBackdropEscape) {
715
+ this._dialogRef.backdropClick()
716
+ .pipe(takeUntil(this._destroy$))
717
+ .subscribe(() => {
718
+ this._formClose();
719
+ });
720
+ this._destroy$
721
+ .subscribe(() => {
722
+ this._dialogRef.disableClose = false;
723
+ });
724
+ }
727
725
  }
728
726
  }
729
727
  _registerAutocomplete() {