@ukhomeoffice/cop-react-form-renderer 6.0.0-peter → 6.0.1-peter
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.
|
@@ -56,13 +56,13 @@ var onPageAction = function onPageAction(action, patch, patchLabel, hooks, data,
|
|
|
56
56
|
_handlers.default.navigate(action, pageId, onPageChange);
|
|
57
57
|
setSubmitting(false);
|
|
58
58
|
} else {
|
|
59
|
+
var baseData = _objectSpread(_objectSpread(_objectSpread({}, data), patch), formState.page.formData);
|
|
59
60
|
var pageUpdate = function pageUpdate(next) {
|
|
60
61
|
return onPageChange(_helpers.default.getNextPageId(type, pages, pageId, action, next));
|
|
61
62
|
};
|
|
62
63
|
/* eslint-disable no-case-declarations */
|
|
63
64
|
switch (action.type) {
|
|
64
65
|
case _models.PageAction.TYPES.SUBMIT:
|
|
65
|
-
_helpers.default.clearOutUncompletedRoutes(form, data);
|
|
66
66
|
setPagePoint('submit');
|
|
67
67
|
break;
|
|
68
68
|
case _models.PageAction.TYPES.SAVE_AND_NAVIGATE:
|
|
@@ -108,8 +108,13 @@ var onPageAction = function onPageAction(action, patch, patchLabel, hooks, data,
|
|
|
108
108
|
setData(submissionData);
|
|
109
109
|
}
|
|
110
110
|
;
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
if (action.type === _models.PageAction.TYPES.SUBMIT) {
|
|
112
|
+
_helpers.default.clearOutUncompletedRoutes({
|
|
113
|
+
pages: pages,
|
|
114
|
+
components: components
|
|
115
|
+
}, submissionData);
|
|
116
|
+
}
|
|
117
|
+
// In case of hub-and-spoke if patchLabel has changed then
|
|
113
118
|
// save name and value to variables for call to onSubmit hook
|
|
114
119
|
var changedFieldName;
|
|
115
120
|
var changedFieldValue;
|