@micromag/data 0.3.335 → 0.3.341

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/es/index.js CHANGED
@@ -7,8 +7,8 @@ import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
7
7
  import _inherits from '@babel/runtime/helpers/inherits';
8
8
  import _createSuper from '@babel/runtime/helpers/createSuper';
9
9
  import { getJSON, getCSRFHeaders, postJSON } from '@folklore/fetch';
10
- import { generatePath } from 'react-router';
11
10
  import { stringify, parse } from 'query-string';
11
+ import { generatePath } from 'react-router';
12
12
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
13
13
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
14
14
  import isString from 'lodash/isString';
@@ -768,12 +768,14 @@ var useItems = function useItems(_ref) {
768
768
  setPagination(initialPagination);
769
769
  }, [getPages, setItems, setPagination]);
770
770
  useEffect(function () {
771
- // console.log('try to load');
771
+ // eslint-disable-next-line
772
+ console.log('try to load');
772
773
  if (!canLoad || loading || lastPage !== null && pageNumber > lastPage) {
773
774
  // console.log('skips loading');
774
775
  return;
775
776
  }
776
- // console.log('actually load', query, pageNumber, pageCount);
777
+ // eslint-disable-next-line
778
+ console.log('actually load', canLoad, loading, lastPage, pageNumber);
777
779
  setLoading(true);
778
780
  setCanLoad(false);
779
781
  // TODO: make this a cancellable promise
package/lib/index.js CHANGED
@@ -11,8 +11,8 @@ var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
11
11
  var _inherits = require('@babel/runtime/helpers/inherits');
12
12
  var _createSuper = require('@babel/runtime/helpers/createSuper');
13
13
  var fetch = require('@folklore/fetch');
14
- var reactRouter = require('react-router');
15
14
  var queryString = require('query-string');
15
+ var reactRouter = require('react-router');
16
16
  var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
17
17
  var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
18
18
  var isString = require('lodash/isString');
@@ -786,12 +786,14 @@ var useItems = function useItems(_ref) {
786
786
  setPagination(initialPagination);
787
787
  }, [getPages, setItems, setPagination]);
788
788
  React.useEffect(function () {
789
- // console.log('try to load');
789
+ // eslint-disable-next-line
790
+ console.log('try to load');
790
791
  if (!canLoad || loading || lastPage !== null && pageNumber > lastPage) {
791
792
  // console.log('skips loading');
792
793
  return;
793
794
  }
794
- // console.log('actually load', query, pageNumber, pageCount);
795
+ // eslint-disable-next-line
796
+ console.log('actually load', canLoad, loading, lastPage, pageNumber);
795
797
  setLoading(true);
796
798
  setCanLoad(false);
797
799
  // TODO: make this a cancellable promise
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/data",
3
- "version": "0.3.335",
3
+ "version": "0.3.341",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -59,5 +59,5 @@
59
59
  "publishConfig": {
60
60
  "access": "public"
61
61
  },
62
- "gitHead": "2d4617589f6091803cee6d5614c61297bba3bdc6"
62
+ "gitHead": "44528c76fb79f21327a1a97c22270cd31f1f9d75"
63
63
  }