@suntelecoms/ngx-dynamic-form 1.7.1 → 1.7.2

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.
@@ -882,6 +882,10 @@ class DynamicFieldComponent {
882
882
  this.formControl.valueChanges.subscribe(value => {
883
883
  this.fieldChange.emit({ key: this.field.key, value });
884
884
  });
885
+ // copyFrom: mirror source field value into this field whenever source changes
886
+ if (this.field.copyFrom) {
887
+ this.form.get(this.field.copyFrom)?.valueChanges.subscribe(v => this.formControl.setValue(v, { emitEvent: false }));
888
+ }
885
889
  if (!this.hasOptions)
886
890
  return;
887
891
  if (this.field.dependsOn) {