|
@@ -155,6 +155,12 @@ export class DynaformService {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ updateForm(newModel: StringMap, form: FormGroup, meta: StringMap): void {
|
|
|
|
+ const mapping = extractFieldMappings(meta); // Memoize
|
|
|
|
+ const mappedModel = this.modelMapper.reverseMap(newModel, mapping);
|
|
|
|
+ form.patchValue(mappedModel);
|
|
|
|
+ }
|
|
|
|
+
|
|
buildNewModel(originalModel: StringMap, formVal: StringMap, meta: StringMap): StringMap {
|
|
buildNewModel(originalModel: StringMap, formVal: StringMap, meta: StringMap): StringMap {
|
|
console.log('%c *** buildNewModel *** ', this.conGreen);
|
|
console.log('%c *** buildNewModel *** ', this.conGreen);
|
|
const mapping = extractFieldMappings(meta); // Memoize
|
|
const mapping = extractFieldMappings(meta); // Memoize
|