@sumaris-net/ngx-components 1.19.28 → 1.19.29

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.
@@ -4812,8 +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, opts) {
4816
4816
  var _this = this;
4817
+ if (opts === void 0) { opts = { listenStatusChanges: false }; }
4817
4818
  if (!form) {
4818
4819
  this._dispose();
4819
4820
  return undefined;
@@ -4834,8 +4835,18 @@
4834
4835
  // subscribe to valueChanges event, in case control value change
4835
4836
  if (!this._onControlValueChanges && control) {
4836
4837
  this._onControlValueChanges = control.valueChanges.subscribe(function (value) {
4837
- _this.value = value;
4838
- _this._ref.markForCheck();
4838
+ if (value !== _this.value) {
4839
+ _this.value = value;
4840
+ _this._ref.markForCheck();
4841
+ }
4842
+ });
4843
+ }
4844
+ if (opts.listenStatusChanges && !this._onControlStatusChanges && control) {
4845
+ this._onControlStatusChanges = control.statusChanges.subscribe(function (value) {
4846
+ if (value !== _this.value) {
4847
+ _this.value = value;
4848
+ _this._ref.markForCheck();
4849
+ }
4839
4850
  });
4840
4851
  }
4841
4852
  return this.value;