@smartbit4all/ng-client 3.3.143 → 3.3.144

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.
@@ -5731,7 +5731,6 @@ class SmartformwidgetComponent {
5731
5731
  this.form.controls[this.widgetInstance.key].setValue([]);
5732
5732
  this.form.controls[this.widgetInstance.key].updateValueAndValidity();
5733
5733
  }
5734
- let asd = this.widgetInstance.value;
5735
5734
  this.form.controls[this.widgetInstance.key].value.push(value);
5736
5735
  this.form.controls[this.widgetInstance.key].updateValueAndValidity();
5737
5736
  }
@@ -5759,6 +5758,10 @@ class SmartformwidgetComponent {
5759
5758
  if ((this.widgetInstance.maxValues &&
5760
5759
  this.widgetInstance.value.length < this.widgetInstance.maxValues) ||
5761
5760
  !this.widgetInstance.maxValues) {
5761
+ if (!this.form.controls[this.widgetInstance.key].value) {
5762
+ this.form.controls[this.widgetInstance.key].setValue([]);
5763
+ this.form.controls[this.widgetInstance.key].updateValueAndValidity();
5764
+ }
5762
5765
  this.form.controls[this.widgetInstance.key].value.push(value);
5763
5766
  this.form.controls[this.widgetInstance.key].updateValueAndValidity();
5764
5767
  }