@sheinx/base 3.7.7-beta.6 → 3.7.7-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.
- package/cjs/table/table.d.ts.map +1 -1
- package/cjs/table/table.js +7 -4
- package/esm/table/table.d.ts.map +1 -1
- package/esm/table/table.js +7 -4
- package/package.json +2 -2
package/cjs/table/table.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["table.tsx"],"names":[],"mappings":"AA0BA,OAAO,EAAgB,UAAU,EAAE,MAAM,cAAc,CAAC;;AAexD,
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["table.tsx"],"names":[],"mappings":"AA0BA,OAAO,EAAgB,UAAU,EAAE,MAAM,cAAc,CAAC;;AAexD,wBA+rBE"}
|
package/cjs/table/table.js
CHANGED
|
@@ -93,7 +93,8 @@ var _default = exports.default = function _default(props) {
|
|
|
93
93
|
};
|
|
94
94
|
var _useRef = (0, _react.useRef)({
|
|
95
95
|
emptyHeight: 0,
|
|
96
|
-
|
|
96
|
+
theadHeight: 0,
|
|
97
|
+
tfootHeight: 0,
|
|
97
98
|
scrollingTimer: null
|
|
98
99
|
}),
|
|
99
100
|
context = _useRef.current;
|
|
@@ -231,9 +232,10 @@ var _default = exports.default = function _default(props) {
|
|
|
231
232
|
var theadHeight = (theadRef === null || theadRef === void 0 || (_theadRef$current = theadRef.current) === null || _theadRef$current === void 0 ? void 0 : _theadRef$current.clientHeight) || 0;
|
|
232
233
|
var tfootHeight = ((_tfootRef$current = tfootRef.current) === null || _tfootRef$current === void 0 ? void 0 : _tfootRef$current.clientHeight) || 0;
|
|
233
234
|
if (props.sticky) {
|
|
234
|
-
context.
|
|
235
|
+
context.tfootHeight = tfootHeight;
|
|
235
236
|
} else {
|
|
236
|
-
context.
|
|
237
|
+
context.theadHeight = theadHeight;
|
|
238
|
+
context.tfootHeight = tfootHeight;
|
|
237
239
|
}
|
|
238
240
|
});
|
|
239
241
|
(0, _react.useEffect)(function () {
|
|
@@ -269,7 +271,8 @@ var _default = exports.default = function _default(props) {
|
|
|
269
271
|
innerRef: tbodyRef,
|
|
270
272
|
scrollLeft: props.scrollLeft,
|
|
271
273
|
isRtl: isRtl,
|
|
272
|
-
|
|
274
|
+
theadHeight: context.theadHeight,
|
|
275
|
+
tfootHeight: context.tfootHeight
|
|
273
276
|
});
|
|
274
277
|
var syncHeaderScroll = (0, _hooks.usePersistFn)(function (left) {
|
|
275
278
|
var _tableRef$current;
|
package/esm/table/table.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["table.tsx"],"names":[],"mappings":"AA0BA,OAAO,EAAgB,UAAU,EAAE,MAAM,cAAc,CAAC;;AAexD,
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["table.tsx"],"names":[],"mappings":"AA0BA,OAAO,EAAgB,UAAU,EAAE,MAAM,cAAc,CAAC;;AAexD,wBA+rBE"}
|
package/esm/table/table.js
CHANGED
|
@@ -86,7 +86,8 @@ export default (function (props) {
|
|
|
86
86
|
};
|
|
87
87
|
var _useRef = useRef({
|
|
88
88
|
emptyHeight: 0,
|
|
89
|
-
|
|
89
|
+
theadHeight: 0,
|
|
90
|
+
tfootHeight: 0,
|
|
90
91
|
scrollingTimer: null
|
|
91
92
|
}),
|
|
92
93
|
context = _useRef.current;
|
|
@@ -224,9 +225,10 @@ export default (function (props) {
|
|
|
224
225
|
var theadHeight = (theadRef === null || theadRef === void 0 || (_theadRef$current = theadRef.current) === null || _theadRef$current === void 0 ? void 0 : _theadRef$current.clientHeight) || 0;
|
|
225
226
|
var tfootHeight = ((_tfootRef$current = tfootRef.current) === null || _tfootRef$current === void 0 ? void 0 : _tfootRef$current.clientHeight) || 0;
|
|
226
227
|
if (props.sticky) {
|
|
227
|
-
context.
|
|
228
|
+
context.tfootHeight = tfootHeight;
|
|
228
229
|
} else {
|
|
229
|
-
context.
|
|
230
|
+
context.theadHeight = theadHeight;
|
|
231
|
+
context.tfootHeight = tfootHeight;
|
|
230
232
|
}
|
|
231
233
|
});
|
|
232
234
|
useEffect(function () {
|
|
@@ -262,7 +264,8 @@ export default (function (props) {
|
|
|
262
264
|
innerRef: tbodyRef,
|
|
263
265
|
scrollLeft: props.scrollLeft,
|
|
264
266
|
isRtl: isRtl,
|
|
265
|
-
|
|
267
|
+
theadHeight: context.theadHeight,
|
|
268
|
+
tfootHeight: context.tfootHeight
|
|
266
269
|
});
|
|
267
270
|
var syncHeaderScroll = usePersistFn(function (left) {
|
|
268
271
|
var _tableRef$current;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheinx/base",
|
|
3
|
-
"version": "3.7.7-beta.
|
|
3
|
+
"version": "3.7.7-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.7.7-beta.
|
|
13
|
+
"@sheinx/hooks": "3.7.7-beta.7",
|
|
14
14
|
"immer": "^10.0.0",
|
|
15
15
|
"classnames": "^2.0.0",
|
|
16
16
|
"@shined/reactive": "^0.1.3-alpha.0"
|