kui-utils 0.0.30 → 0.0.32

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/index.js CHANGED
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { useState, useMemo, useEffect } from 'react';
3
3
  import _ from 'lodash';
4
4
  import { useLocation } from 'react-router-dom';
5
- import { isObservable, toJS, makeAutoObservable } from 'mobx';
5
+ import { isObservable, toJS, runInAction, makeAutoObservable } from 'mobx';
6
6
  import { DateTime } from 'luxon';
7
7
 
8
8
  function setRef(ref, value) {
@@ -2196,7 +2196,9 @@ var Loader = /** @class */ (function () {
2196
2196
  return new Promise(function (resolve) {
2197
2197
  // eslint-disable-next-line no-promise-executor-return
2198
2198
  return setTimeout(function () {
2199
- _this.isLoading = false;
2199
+ runInAction(function () {
2200
+ _this.isLoading = false;
2201
+ });
2200
2202
  resolve(true);
2201
2203
  }, _this.delayTime - (_this.timeAfterLoading - _this.timeBeforeLoading));
2202
2204
  });
@@ -2223,6 +2225,7 @@ var Loader = /** @class */ (function () {
2223
2225
  this.timeBeforeLoading = 0;
2224
2226
  this.timeAfterLoading = 0;
2225
2227
  this.delayTime = delayTime || defaultDelayTime;
2228
+ this.errorMessage = "";
2226
2229
  makeAutoObservable(this);
2227
2230
  }
2228
2231
  return Loader;