@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.
- package/doc/changelog.md +3 -0
- package/esm2020/src/app/core/form/form.utils.mjs +6 -1
- package/fesm2015/sumaris-net.ngx-components.mjs +5 -0
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +5 -0
- package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -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;
|