@sheinx/hooks 3.7.5-beta.5 → 3.7.5-beta.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"use-pagination.d.ts","sourceRoot":"","sources":["use-pagination.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D,QAAA,MAAM,aAAa,UAAW,mBAAmB;;;;kBAqBT,MAAM,SAAS,MAAM;;;;;;;CAiC5D,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"use-pagination.d.ts","sourceRoot":"","sources":["use-pagination.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D,QAAA,MAAM,aAAa,UAAW,mBAAmB;;;;kBAqBT,MAAM,SAAS,MAAM;;;;;;;CAkC5D,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -61,7 +61,8 @@ var usePagination = function usePagination(props) {
61
61
  return _objectSpread({}, mergedEventHandlers);
62
62
  };
63
63
  return {
64
- current: current,
64
+ // current,
65
+ current: currentProp !== undefined ? currentProp : current,
65
66
  pageSize: pageSize,
66
67
  total: total,
67
68
  onChange: handleChange,
@@ -623,9 +623,8 @@ var useTree = function useTree(props) {
623
623
  }
624
624
  context.updateMap.forEach(function (call, id) {
625
625
  if (ignoreExpanded) {
626
- var _ref4 = call('get', true),
627
- hasTriggered = _ref4.hasTriggered;
628
- if (hasTriggered) return;
626
+ var nodeStatus = call('get', true);
627
+ if (nodeStatus && nodeStatus.hasTriggered) return;
629
628
  }
630
629
  call('expanded', tempExpandMap.has(id));
631
630
  });
@@ -1 +1 @@
1
- {"version":3,"file":"use-pagination.d.ts","sourceRoot":"","sources":["use-pagination.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D,QAAA,MAAM,aAAa,UAAW,mBAAmB;;;;kBAqBT,MAAM,SAAS,MAAM;;;;;;;CAiC5D,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"use-pagination.d.ts","sourceRoot":"","sources":["use-pagination.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D,QAAA,MAAM,aAAa,UAAW,mBAAmB;;;;kBAqBT,MAAM,SAAS,MAAM;;;;;;;CAkC5D,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -55,7 +55,8 @@ var usePagination = function usePagination(props) {
55
55
  return _objectSpread({}, mergedEventHandlers);
56
56
  };
57
57
  return {
58
- current: current,
58
+ // current,
59
+ current: currentProp !== undefined ? currentProp : current,
59
60
  pageSize: pageSize,
60
61
  total: total,
61
62
  onChange: handleChange,
@@ -616,9 +616,8 @@ var useTree = function useTree(props) {
616
616
  }
617
617
  context.updateMap.forEach(function (call, id) {
618
618
  if (ignoreExpanded) {
619
- var _ref4 = call('get', true),
620
- hasTriggered = _ref4.hasTriggered;
621
- if (hasTriggered) return;
619
+ var nodeStatus = call('get', true);
620
+ if (nodeStatus && nodeStatus.hasTriggered) return;
622
621
  }
623
622
  call('expanded', tempExpandMap.has(id));
624
623
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/hooks",
3
- "version": "3.7.5-beta.5",
3
+ "version": "3.7.5-beta.7",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",