@openmrs/esm-form-engine-lib 4.2.2-pre.2584 → 4.2.2-pre.2589
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.
|
@@ -8,7 +8,7 @@ import { usePostSubmissionActions } from "../hooks/usePostSubmissionActions.js";
|
|
|
8
8
|
const FormFactoryProviderContext = /*#__PURE__*/ createContext(undefined);
|
|
9
9
|
export const FormFactoryProvider = ({ patient, patientUUID, sessionMode, sessionDate, formJson, workspaceLayout, location, provider, visit, isFormExpanded = true, children, formSubmissionProps, hideFormCollapseToggle, handleConfirmQuestionDeletion, setIsFormDirty })=>{
|
|
10
10
|
const { t } = useTranslation();
|
|
11
|
-
const rootForm = useRef();
|
|
11
|
+
const rootForm = useRef(undefined);
|
|
12
12
|
const subForms = useRef({});
|
|
13
13
|
const layoutType = useLayoutType();
|
|
14
14
|
const { isSubmitting, setIsSubmitting, onSubmit, onError, handleClose } = formSubmissionProps;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-form-engine-lib",
|
|
3
|
-
"version": "4.2.2-pre.
|
|
3
|
+
"version": "4.2.2-pre.2589",
|
|
4
4
|
"description": "React Form Engine for O3",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"resize-observer-polyfill": "^1.5.1",
|
|
91
91
|
"rimraf": "^5.0.0",
|
|
92
92
|
"sass": "^1.77.2",
|
|
93
|
-
"swr": "
|
|
93
|
+
"swr": "2.5.1",
|
|
94
94
|
"turbo": "^2.5.2",
|
|
95
95
|
"typescript": "^5.0.0",
|
|
96
96
|
"vitest": "^4.1.2"
|
|
@@ -78,7 +78,7 @@ export const FormFactoryProvider: React.FC<FormFactoryProviderProps> = ({
|
|
|
78
78
|
setIsFormDirty,
|
|
79
79
|
}) => {
|
|
80
80
|
const { t } = useTranslation();
|
|
81
|
-
const rootForm = useRef<FormContextProps>();
|
|
81
|
+
const rootForm = useRef<FormContextProps | undefined>(undefined);
|
|
82
82
|
const subForms = useRef<Record<string, FormContextProps>>({});
|
|
83
83
|
const layoutType = useLayoutType();
|
|
84
84
|
const { isSubmitting, setIsSubmitting, onSubmit, onError, handleClose } = formSubmissionProps;
|