@tft/crispr-forms 13.0.10 → 13.0.11
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/lib/form.helpers.mjs +6 -2
- package/fesm2015/tft-crispr-forms.mjs +5 -1
- package/fesm2015/tft-crispr-forms.mjs.map +1 -1
- package/fesm2020/tft-crispr-forms.mjs +5 -1
- package/fesm2020/tft-crispr-forms.mjs.map +1 -1
- package/package.json +1 -1
- package/tft-crispr-forms-13.0.11.tgz +0 -0
- package/tft-crispr-forms-13.0.10.tgz +0 -0
|
@@ -242,10 +242,14 @@ function buildFormGroupFromConfig(config, value = null, group = new FormGroup({}
|
|
|
242
242
|
if (isControlConfig(controlConfig)) {
|
|
243
243
|
// then add a control to the group using the controlName from configuration
|
|
244
244
|
const { controlName } = controlConfig;
|
|
245
|
+
if (group.get(controlName)) {
|
|
246
|
+
group.removeControl(controlName);
|
|
247
|
+
}
|
|
245
248
|
// if there's a value object and it has a non-null/undefined value for this field use it.
|
|
246
249
|
// Otherwise, default to null
|
|
247
250
|
const controlValue = (value && value[controlName]) ?? null;
|
|
248
|
-
|
|
251
|
+
const control = createControlForType(controlConfig, controlValue);
|
|
252
|
+
group.addControl(controlName, control);
|
|
249
253
|
}
|
|
250
254
|
});
|
|
251
255
|
group.setValidators(config.validators);
|