@ngx-formly/core 5.10.31 → 5.10.32
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/ngx-formly-core.umd.js +17 -6
- package/bundles/ngx-formly-core.umd.js.map +1 -1
- package/bundles/ngx-formly-core.umd.min.js +1 -1
- package/bundles/ngx-formly-core.umd.min.js.map +1 -1
- package/esm2015/lib/extensions/field-form/field-form.js +9 -6
- package/esm2015/lib/utils.js +6 -2
- package/esm5/lib/extensions/field-form/field-form.js +11 -6
- package/esm5/lib/utils.js +6 -2
- package/fesm2015/ngx-formly-core.js +14 -7
- package/fesm2015/ngx-formly-core.js.map +1 -1
- package/fesm5/ngx-formly-core.js +15 -6
- package/fesm5/ngx-formly-core.js.map +1 -1
- package/package.json +1 -1
|
@@ -127,8 +127,12 @@
|
|
|
127
127
|
return field.id;
|
|
128
128
|
/** @type {?} */
|
|
129
129
|
var type = field.type;
|
|
130
|
-
if (!type && field.template)
|
|
130
|
+
if (!type && field.template) {
|
|
131
131
|
type = 'template';
|
|
132
|
+
}
|
|
133
|
+
if (isFunction(type)) {
|
|
134
|
+
type = (( /** @type {?} */(type))).prototype.constructor.name;
|
|
135
|
+
}
|
|
132
136
|
return [formId, type, field.key, index].join('_');
|
|
133
137
|
}
|
|
134
138
|
/**
|
|
@@ -3549,26 +3553,33 @@
|
|
|
3549
3553
|
/**
|
|
3550
3554
|
* @private
|
|
3551
3555
|
* @param {?} field
|
|
3556
|
+
* @param {?=} disabled
|
|
3552
3557
|
* @return {?}
|
|
3553
3558
|
*/
|
|
3554
3559
|
FieldFormExtension.prototype.setValidators = /**
|
|
3555
3560
|
* @private
|
|
3556
3561
|
* @param {?} field
|
|
3562
|
+
* @param {?=} disabled
|
|
3557
3563
|
* @return {?}
|
|
3558
3564
|
*/
|
|
3559
|
-
function (field) {
|
|
3565
|
+
function (field, disabled) {
|
|
3560
3566
|
var _this = this;
|
|
3567
|
+
if (disabled === void 0) {
|
|
3568
|
+
disabled = false;
|
|
3569
|
+
}
|
|
3561
3570
|
/** @type {?} */
|
|
3562
3571
|
var markForCheck = false;
|
|
3572
|
+
if (disabled === false && field.key && field.templateOptions && field.templateOptions.disabled) {
|
|
3573
|
+
disabled = true;
|
|
3574
|
+
}
|
|
3563
3575
|
(field.fieldGroup || []).forEach(( /**
|
|
3564
3576
|
* @param {?} f
|
|
3565
3577
|
* @return {?}
|
|
3566
|
-
*/function (f) { return _this.setValidators(f) && (markForCheck = true); }));
|
|
3578
|
+
*/function (f) { return _this.setValidators(f, disabled) && (markForCheck = true); }));
|
|
3567
3579
|
if (field.key || !field.parent || (!field.key && !field.fieldGroup)) {
|
|
3568
3580
|
var c_1 = field.formControl;
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
if (field.key && c_1) {
|
|
3581
|
+
field.templateOptions = field.templateOptions || {};
|
|
3582
|
+
if (field.key && c_1 && c_1 instanceof forms.FormControl) {
|
|
3572
3583
|
if (disabled && c_1.enabled) {
|
|
3573
3584
|
c_1.disable({ emitEvent: false, onlySelf: true });
|
|
3574
3585
|
markForCheck = true;
|