@sumaris-net/ngx-components 1.19.29 → 1.19.30
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/sumaris-net.ngx-components.umd.js +14 -9
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/doc/changelog.md +3 -0
- package/esm2015/src/app/shared/pipes/form.pipes.js +14 -9
- package/fesm2015/sumaris-net.ngx-components.js +13 -8
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/shared/pipes/form.pipes.d.ts +2 -4
|
@@ -4712,8 +4712,8 @@
|
|
|
4712
4712
|
// if there is a subscription to onLangChange, clean it
|
|
4713
4713
|
this._dispose();
|
|
4714
4714
|
// subscribe to onTranslationChange event, in case the translations change
|
|
4715
|
-
if (!this.
|
|
4716
|
-
this.
|
|
4715
|
+
if (!this._onFormStatusChanges) {
|
|
4716
|
+
this._onFormStatusChanges = form.statusChanges.subscribe(function (status) {
|
|
4717
4717
|
_this._updateValue(form, opts, status);
|
|
4718
4718
|
});
|
|
4719
4719
|
}
|
|
@@ -4736,9 +4736,9 @@
|
|
|
4736
4736
|
* Clean any existing subscription to change events
|
|
4737
4737
|
*/
|
|
4738
4738
|
FormErrorTranslatePipe.prototype._dispose = function () {
|
|
4739
|
-
if (typeof this.
|
|
4740
|
-
this.
|
|
4741
|
-
this.
|
|
4739
|
+
if (typeof this._onFormStatusChanges !== 'undefined') {
|
|
4740
|
+
this._onFormStatusChanges.unsubscribe();
|
|
4741
|
+
this._onFormStatusChanges = undefined;
|
|
4742
4742
|
}
|
|
4743
4743
|
};
|
|
4744
4744
|
return FormErrorTranslatePipe;
|
|
@@ -4812,9 +4812,9 @@
|
|
|
4812
4812
|
this.value = undefined;
|
|
4813
4813
|
this._lastControl = null;
|
|
4814
4814
|
}
|
|
4815
|
-
FormGetValuePipe.prototype.transform = function (form, path,
|
|
4815
|
+
FormGetValuePipe.prototype.transform = function (form, path, listenStatusChanges) {
|
|
4816
4816
|
var _this = this;
|
|
4817
|
-
if (
|
|
4817
|
+
if (listenStatusChanges === void 0) { listenStatusChanges = false; }
|
|
4818
4818
|
if (!form) {
|
|
4819
4819
|
this._dispose();
|
|
4820
4820
|
return undefined;
|
|
@@ -4841,8 +4841,9 @@
|
|
|
4841
4841
|
}
|
|
4842
4842
|
});
|
|
4843
4843
|
}
|
|
4844
|
-
if (
|
|
4845
|
-
this._onControlStatusChanges = control.statusChanges.subscribe(function (
|
|
4844
|
+
if (listenStatusChanges && !this._onControlStatusChanges && control) {
|
|
4845
|
+
this._onControlStatusChanges = control.statusChanges.subscribe(function (status) {
|
|
4846
|
+
var value = control.value;
|
|
4846
4847
|
if (value !== _this.value) {
|
|
4847
4848
|
_this.value = value;
|
|
4848
4849
|
_this._ref.markForCheck();
|
|
@@ -4862,6 +4863,10 @@
|
|
|
4862
4863
|
this._onControlValueChanges.unsubscribe();
|
|
4863
4864
|
this._onControlValueChanges = undefined;
|
|
4864
4865
|
}
|
|
4866
|
+
if (typeof this._onControlStatusChanges !== 'undefined') {
|
|
4867
|
+
this._onControlStatusChanges.unsubscribe();
|
|
4868
|
+
this._onControlStatusChanges = undefined;
|
|
4869
|
+
}
|
|
4865
4870
|
};
|
|
4866
4871
|
return FormGetValuePipe;
|
|
4867
4872
|
}());
|