@klippa/ngx-enhancy-forms 10.1.0 → 10.2.0

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,8 +849,18 @@
849
849
  configurable: true
850
850
  });
851
851
  ButtonComponent.prototype.onClick = function (event) {
852
+ var _this = this;
852
853
  if (this.disabled) {
853
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;
863
+ });
854
864
  }
855
865
  };
856
866
  return ButtonComponent;
@@ -870,6 +880,7 @@
870
880
  disabled: [{ type: core.Input }],
871
881
  isLoading: [{ type: core.Input }],
872
882
  type: [{ type: core.Input }],
883
+ clickCallback: [{ type: core.Input }],
873
884
  _: [{ type: core.HostBinding, args: ['class._fullWidth',] }]
874
885
  };
875
886