@sumaris-net/ngx-components 1.23.35 → 1.23.36
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/bundles/sumaris-net.ngx-components.umd.js +10 -5
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/esm2015/src/app/core/form/form.utils.js +9 -6
- package/fesm2015/sumaris-net.ngx-components.js +8 -5
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/form/form.utils.d.ts +2 -2
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -4553,7 +4553,8 @@
|
|
|
4553
4553
|
configurable: true
|
|
4554
4554
|
});
|
|
4555
4555
|
FormArrayHelper.prototype.add = function (value, options) {
|
|
4556
|
-
|
|
4556
|
+
var _this = this;
|
|
4557
|
+
return addValueInArray(this._formArray, function () { return _this.createControl(value); }, this.equals, this.isEmpty, value, options);
|
|
4557
4558
|
};
|
|
4558
4559
|
FormArrayHelper.prototype.removeAt = function (index) {
|
|
4559
4560
|
// Do not remove if last criterion
|
|
@@ -4589,12 +4590,16 @@
|
|
|
4589
4590
|
};
|
|
4590
4591
|
/**
|
|
4591
4592
|
* Resize the FormArray, then set values
|
|
4592
|
-
* @param
|
|
4593
|
+
* @param values
|
|
4593
4594
|
* @param opts
|
|
4594
4595
|
*/
|
|
4595
|
-
FormArrayHelper.prototype.setValue = function (
|
|
4596
|
-
|
|
4597
|
-
this.
|
|
4596
|
+
FormArrayHelper.prototype.setValue = function (values, opts) {
|
|
4597
|
+
var _this = this;
|
|
4598
|
+
this.resize(0);
|
|
4599
|
+
(values || []).forEach(function (value, i) {
|
|
4600
|
+
var isLast = i === values.length - 1;
|
|
4601
|
+
_this.add(value, { emitEvent: isLast });
|
|
4602
|
+
});
|
|
4598
4603
|
};
|
|
4599
4604
|
/**
|
|
4600
4605
|
* Resize the FormArray, then patch values
|