You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -441,6 +442,7 @@ export const questionnaireStore = createStore<QuestionnaireStoreType>()((set, ge
441
442
442
443
4. Re-run calculatedExpressions as a final step to ensure all calculations are up-to-date, incorporating any toggled options or dynamic value set changes.
443
444
5. Update store state based on the expressions that changed
// The buildSourceQuestionnaire function now takes the initialisedQuestionnaireResponse, which includes item.initial values from the Questionnaire.
119
+
// QR is set to undefined here to prevent it from being initialised twice. This is defined like that for backward compatibility purposes.
120
+
// Warning: setting the QR here breaks pre-pop. For initialisation logic, do it in questionnaireStore.getState().updateExpressions() with isInitialUpdate=true.
127
121
awaitquestionnaireStore
128
122
.getState()
129
123
.buildSourceQuestionnaire(
130
124
questionnaire,
131
-
initialisedQuestionnaireResponse,
125
+
undefined,
132
126
additionalContext,
133
127
terminologyServerUrl,
134
128
readOnly,
135
129
qItemOverrideComponents,
136
130
sdcUiOverrideComponents
137
131
);
138
132
133
+
// Initialise an empty questionnaireResponse from a given questionnaire
134
+
// Optionally takes in an existing questionnaireResponse to be initialised
0 commit comments