@sumaris-net/ngx-components 2.2.1-rc4 → 2.2.1-rc5

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.
@@ -4500,9 +4500,14 @@ class FormArrayHelper {
4500
4500
  this.setAllowEmptyArray(toBoolean(options?.allowEmptyArray, false));
4501
4501
  }
4502
4502
  static getOrCreateArray(formBuilder, form, arrayName) {
4503
+ const disabled = form.disabled;
4503
4504
  let arrayControl = form.get(arrayName);
4504
4505
  if (!arrayControl) {
4505
4506
  arrayControl = formBuilder.array([]);
4507
+ // Apply parent disabled state, before to push it into the array
4508
+ // This is need to avoid parent form to be enabled, after calling resizeArray()
4509
+ if (disabled && arrayControl.enabled)
4510
+ arrayControl.disable({ emitEvent: false });
4506
4511
  form.addControl(arrayName, arrayControl);
4507
4512
  }
4508
4513
  return arrayControl;