@ukhomeoffice/cop-react-form-renderer 5.5.1 → 5.6.0
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.
|
@@ -133,8 +133,11 @@ var onPageAction = function onPageAction(action, patch, patchLabel, hooks, data,
|
|
|
133
133
|
});
|
|
134
134
|
pageUpdate(sData);
|
|
135
135
|
}, function (errors) {
|
|
136
|
+
var wipeData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
136
137
|
_handlers.default.submissionError(errors, addErrors);
|
|
137
|
-
|
|
138
|
+
if (wipeData) {
|
|
139
|
+
setData(_objectSpread({}, preSubmitData));
|
|
140
|
+
}
|
|
138
141
|
}, changedFieldName, changedFieldValue, pageId);
|
|
139
142
|
}
|
|
140
143
|
;
|