@klippa/ngx-enhancy-forms 10.2.0 → 10.2.1

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.
@@ -849,19 +849,27 @@
849
849
  configurable: true
850
850
  });
851
851
  ButtonComponent.prototype.onClick = function (event) {
852
- var _this = this;
853
- if (this.disabled) {
854
- event.stopPropagation();
855
- return;
856
- }
857
- if (isValueSet(this.clickCallback)) {
858
- this.isLoading = true;
859
- this.clickCallback(event)
860
- .catch(function () { return null; }) // gobble up errors.
861
- .then(function () {
862
- _this.isLoading = false;
852
+ return __awaiter(this, void 0, void 0, function () {
853
+ var _this = this;
854
+ return __generator(this, function (_a) {
855
+ switch (_a.label) {
856
+ case 0:
857
+ if (this.disabled) {
858
+ event.stopPropagation();
859
+ return [2 /*return*/];
860
+ }
861
+ if (!isValueSet(this.clickCallback)) return [3 /*break*/, 2];
862
+ this.isLoading = true;
863
+ return [4 /*yield*/, this.clickCallback(event).finally(function () {
864
+ _this.isLoading = false;
865
+ })];
866
+ case 1:
867
+ _a.sent();
868
+ _a.label = 2;
869
+ case 2: return [2 /*return*/];
870
+ }
863
871
  });
864
- }
872
+ });
865
873
  };
866
874
  return ButtonComponent;
867
875
  }());