Skip to content

Commit

Permalink
Add await to other instances of updatedPopulatedProperties call
Browse files Browse the repository at this point in the history
  • Loading branch information
fongsean committed Dec 22, 2024
1 parent 9acdbde commit 17d8b33
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function RepopulateSelectDialog(props: RepopulateSelectDialogProps) {
setCheckedLinkIds(newCheckedIds);
}

function handleConfirmRepopulate() {
async function handleConfirmRepopulate() {
const checkedRepopulatedItems = filterCheckedItemsToRepopulate(
itemsToRepopulate,
checkedLinkIds
Expand All @@ -93,7 +93,7 @@ function RepopulateSelectDialog(props: RepopulateSelectDialogProps) {
});

const repopulatedResponse = repopulateResponse(checkedRepopulatedItems);
const updatedResponse = updatePopulatedProperties(repopulatedResponse, undefined, true);
const updatedResponse = await updatePopulatedProperties(repopulatedResponse, undefined, true);
setUpdatableResponseAsPopulated(updatedResponse);

onCloseDialog();
Expand Down
2 changes: 1 addition & 1 deletion packages/smart-forms-renderer/src/utils/manageForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export async function buildForm(
questionnaireResponse
);
questionnaireResponseStore.getState().buildSourceResponse(initialisedQuestionnaireResponse);
questionnaireStore.getState().updatePopulatedProperties(initialisedQuestionnaireResponse);
await questionnaireStore.getState().updatePopulatedProperties(initialisedQuestionnaireResponse);

if (readOnly) {
questionnaireStore.getState().setFormAsReadOnly(readOnly);
Expand Down

0 comments on commit 17d8b33

Please sign in to comment.