@sumaris-net/ngx-components 2.1.3 → 2.1.4-rc2
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/esm2020/src/app/core/form/form.utils.mjs +7 -5
- package/esm2020/src/app/shared/forms.mjs +2 -2
- package/fesm2015/sumaris-net.ngx-components.mjs +7 -5
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +7 -5
- package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/core/form/form.utils.d.ts +4 -3
- package/src/app/shared/forms.d.ts +1 -1
|
@@ -4210,7 +4210,7 @@ function pushValueInArray(arrayControl, createControl, equals, isEmpty, value, o
|
|
|
4210
4210
|
return hasChanged;
|
|
4211
4211
|
}
|
|
4212
4212
|
/**
|
|
4213
|
-
*
|
|
4213
|
+
* Set an array using given default values. Each default value will be pass to the 'createControl()' function
|
|
4214
4214
|
* @param arrayControl
|
|
4215
4215
|
* @param createControl
|
|
4216
4216
|
* @param values
|
|
@@ -4513,9 +4513,6 @@ class FormArrayHelper {
|
|
|
4513
4513
|
add(value, options) {
|
|
4514
4514
|
return pushValueInArray(this._formArray, this.createControl, this.equals, this.isEmpty, value, options);
|
|
4515
4515
|
}
|
|
4516
|
-
push(value, options) {
|
|
4517
|
-
return pushValueInArray(this._formArray, () => this.createControl(value), this.equals, this.isEmpty, value, options);
|
|
4518
|
-
}
|
|
4519
4516
|
removeAt(index) {
|
|
4520
4517
|
// Do not remove if last criterion
|
|
4521
4518
|
if (!this._allowEmptyArray && this._formArray.length === 1) {
|
|
@@ -4605,7 +4602,12 @@ class AppFormArray extends UntypedFormArray {
|
|
|
4605
4602
|
* @param options
|
|
4606
4603
|
*/
|
|
4607
4604
|
setValue(values, options) {
|
|
4608
|
-
setValueInArray(this, this.createControl, values);
|
|
4605
|
+
setValueInArray(this, this.createControl, values, options);
|
|
4606
|
+
}
|
|
4607
|
+
patchValue(values, options) {
|
|
4608
|
+
// this.resize(values?.length || 0);
|
|
4609
|
+
// super.patchValue(values, options);
|
|
4610
|
+
setValueInArray(this, this.createControl, values, options);
|
|
4609
4611
|
}
|
|
4610
4612
|
enable(opts) {
|
|
4611
4613
|
this.controls.forEach(c => c.enable(opts));
|