@steroidsjs/core 2.2.93 → 2.2.95

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/hooks/useList.js CHANGED
@@ -237,7 +237,7 @@ function useList(config) {
237
237
  react_use_1.useUpdateEffect(function () {
238
238
  union_1["default"](Object.keys(prevQuery), Object.keys(config.query))
239
239
  .forEach(function (key) {
240
- if (isEqual_1["default"](prevQuery[key], config.query[key])) {
240
+ if (!isEqual_1["default"](prevQuery[key], config.query[key])) {
241
241
  dispatch(form_1.formChange(formId, key, config.query[key]));
242
242
  }
243
243
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steroidsjs/core",
3
- "version": "2.2.93",
3
+ "version": "2.2.95",
4
4
  "description": "",
5
5
  "author": "Vladimir Kozhin <hello@kozhindev.com>",
6
6
  "repository": {
@@ -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
@@ -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: