@steroidsjs/core 2.2.93 → 2.2.94
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.
- package/package.json +1 -1
- package/ui/form/Form/Form.d.ts +5 -0
- package/ui/form/Form/Form.js +1 -0
package/package.json
CHANGED
package/ui/form/Form/Form.d.ts
CHANGED
|
@@ -64,6 +64,11 @@ export interface IFormProps {
|
|
|
64
64
|
* @param args
|
|
65
65
|
*/
|
|
66
66
|
onChange?: (...args: any[]) => any;
|
|
67
|
+
/**
|
|
68
|
+
* Обработчик события ошибки выполнения запроса
|
|
69
|
+
* @param args
|
|
70
|
+
*/
|
|
71
|
+
onError?: (...args: any[]) => any;
|
|
67
72
|
/**
|
|
68
73
|
* Обработчик успешного выполнения формы (без ошибок)
|
|
69
74
|
* @param args
|
package/ui/form/Form/Form.js
CHANGED
|
@@ -271,6 +271,7 @@ function Form(props) {
|
|
|
271
271
|
requestError_1 = _c.sent();
|
|
272
272
|
console.error(requestError_1); // eslint-disable-line no-console
|
|
273
273
|
dispatch(form_2.formSetSubmitting(props.formId, false));
|
|
274
|
+
props.onError(requestError_1);
|
|
274
275
|
reduxDispatch(notifications_1.showNotification(props.submitErrorMessage || __('Ошибка сервера'), 'danger'));
|
|
275
276
|
return [2 /*return*/, null];
|
|
276
277
|
case 12:
|