@sheinx/base 3.8.8-beta.5 → 3.8.8-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":"table.d.ts","sourceRoot":"","sources":["table.tsx"],"names":[],"mappings":"AA0BA,OAAO,EAAgB,UAAU,EAAE,MAAM,cAAc,CAAC;;AAexD,wBAktBE"}
1
+ {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["table.tsx"],"names":[],"mappings":"AA0BA,OAAO,EAAgB,UAAU,EAAE,MAAM,cAAc,CAAC;;AAexD,wBAstBE"}
@@ -688,6 +688,12 @@ var _default = exports.default = function _default(props) {
688
688
  children: props.children
689
689
  })
690
690
  });
691
+ var absoluteProviderValue = (0, _react.useMemo)(function () {
692
+ return {
693
+ absolute: true,
694
+ scrollElRef: scrollRef
695
+ };
696
+ }, [scrollRef]);
691
697
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
692
698
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", _objectSpread(_objectSpread({
693
699
  className: (0, _classnames.default)(tableWrapperClass, _defineProperty(_defineProperty(_defineProperty({}, tableClasses.sticky, props.sticky), tableClasses.floatLeft, floatLeft), tableClasses.floatRight, floatRight)),
@@ -698,10 +704,7 @@ var _default = exports.default = function _default(props) {
698
704
  ref: tableRef,
699
705
  dir: config.direction,
700
706
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_absoluteContext.default.Provider, {
701
- value: {
702
- absolute: true,
703
- scrollElRef: scrollRef
704
- },
707
+ value: absoluteProviderValue,
705
708
  children: [renderTable(), renderLoading(), props.children]
706
709
  })
707
710
  })), renderPagination()]
@@ -1 +1 @@
1
- {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["table.tsx"],"names":[],"mappings":"AA0BA,OAAO,EAAgB,UAAU,EAAE,MAAM,cAAc,CAAC;;AAexD,wBAktBE"}
1
+ {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["table.tsx"],"names":[],"mappings":"AA0BA,OAAO,EAAgB,UAAU,EAAE,MAAM,cAAc,CAAC;;AAexD,wBAstBE"}
@@ -681,6 +681,12 @@ export default (function (props) {
681
681
  children: props.children
682
682
  })
683
683
  });
684
+ var absoluteProviderValue = useMemo(function () {
685
+ return {
686
+ absolute: true,
687
+ scrollElRef: scrollRef
688
+ };
689
+ }, [scrollRef]);
684
690
  return /*#__PURE__*/_jsxs(_Fragment, {
685
691
  children: [/*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
686
692
  className: classNames(tableWrapperClass, _defineProperty(_defineProperty(_defineProperty({}, tableClasses.sticky, props.sticky), tableClasses.floatLeft, floatLeft), tableClasses.floatRight, floatRight)),
@@ -691,10 +697,7 @@ export default (function (props) {
691
697
  ref: tableRef,
692
698
  dir: config.direction,
693
699
  children: /*#__PURE__*/_jsxs(AbsoluteContext.Provider, {
694
- value: {
695
- absolute: true,
696
- scrollElRef: scrollRef
697
- },
700
+ value: absoluteProviderValue,
698
701
  children: [renderTable(), renderLoading(), props.children]
699
702
  })
700
703
  })), renderPagination()]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/base",
3
- "version": "3.8.8-beta.5",
3
+ "version": "3.8.8-beta.7",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -10,7 +10,7 @@
10
10
  "module": "./esm/index.js",
11
11
  "typings": "./cjs/index.d.ts",
12
12
  "dependencies": {
13
- "@sheinx/hooks": "3.8.8-beta.5",
13
+ "@sheinx/hooks": "3.8.8-beta.7",
14
14
  "immer": "^10.0.0",
15
15
  "classnames": "^2.0.0",
16
16
  "@shined/reactive": "^0.1.3-alpha.0"