@openmrs/esm-form-engine-lib 2.1.0-pre.1376 → 2.1.0-pre.1382
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/package.json +1 -1
- package/src/processors/encounter/encounter-form-processor.ts +5 -1
- package/src/provider/form-factory-helper.ts +1 -0
- package/30f47e174c423ed1/30f47e174c423ed1.gz +0 -0
- package/6afbf667c2a790fc/6afbf667c2a790fc.gz +0 -0
- package/b7a6701f63a3c084/b7a6701f63a3c084.gz +0 -0
- package/db39c60881061b3d/db39c60881061b3d.gz +0 -0
package/package.json
CHANGED
@@ -257,7 +257,11 @@ export class EncounterFormProcessor extends FormProcessor {
|
|
257
257
|
const adapter = formFieldAdapters[field.type];
|
258
258
|
initialValues[field.id] = emptyValues[field.questionOptions.rendering] ?? null;
|
259
259
|
if (field.questionOptions.calculate?.calculateExpression) {
|
260
|
-
|
260
|
+
try {
|
261
|
+
await evaluateCalculateExpression(field, initialValues, context);
|
262
|
+
} catch (error) {
|
263
|
+
console.error(error);
|
264
|
+
}
|
261
265
|
}
|
262
266
|
if (isEmpty(initialValues[field.id]) && contextInitializableTypes.includes(field.type)) {
|
263
267
|
try {
|
@@ -17,6 +17,7 @@ export function validateForm(context: FormContextProps) {
|
|
17
17
|
} = context;
|
18
18
|
const values = getValues();
|
19
19
|
const errors = formFields
|
20
|
+
.filter((field) => !field.isHidden && !field.isDisabled)
|
20
21
|
.flatMap((field) =>
|
21
22
|
field.validators?.flatMap((validatorConfig) => {
|
22
23
|
const validator = formFieldValidators[validatorConfig.type];
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|