@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.
- package/bundles/klippa-ngx-enhancy-forms.umd.js +11 -0
- package/bundles/klippa-ngx-enhancy-forms.umd.js.map +1 -1
- package/bundles/klippa-ngx-enhancy-forms.umd.min.js +1 -1
- package/bundles/klippa-ngx-enhancy-forms.umd.min.js.map +1 -1
- package/esm2015/lib/elements/button/button.component.js +12 -1
- package/fesm2015/klippa-ngx-enhancy-forms.js +10 -0
- package/fesm2015/klippa-ngx-enhancy-forms.js.map +1 -1
- package/klippa-ngx-enhancy-forms.metadata.json +1 -1
- package/lib/elements/button/button.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -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
|
|