@sheinx/hooks 3.6.0-beta.6 → 3.6.0-beta.8
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/common/use-position-style/index.js +2 -2
- package/cjs/components/use-table/use-table-virtual.d.ts.map +1 -1
- package/cjs/components/use-table/use-table-virtual.js +3 -1
- package/esm/common/use-position-style/index.js +2 -2
- package/esm/components/use-table/use-table-virtual.d.ts.map +1 -1
- package/esm/components/use-table/use-table-virtual.js +3 -1
- package/package.json +1 -1
@@ -163,7 +163,7 @@ var usePositionStyle = exports.usePositionStyle = function usePositionStyle(conf
|
|
163
163
|
var overRight = 0;
|
164
164
|
var overLeft = 0;
|
165
165
|
if (h === 'left') {
|
166
|
-
style.left = rect.left - containerRect.left + containerScroll.left;
|
166
|
+
style.left = rect.left - containerRect.left + containerScroll.left - (offset ? offset[0] : 0);
|
167
167
|
style.transform = '';
|
168
168
|
arrayStyle.left = "8px";
|
169
169
|
if (adjust) {
|
@@ -173,7 +173,7 @@ var usePositionStyle = exports.usePositionStyle = function usePositionStyle(conf
|
|
173
173
|
}
|
174
174
|
}
|
175
175
|
} else if (h === 'right') {
|
176
|
-
style.right = containerRect.right - rect.right + containerScrollBarWidth - containerScroll.left;
|
176
|
+
style.right = containerRect.right - rect.right + containerScrollBarWidth - containerScroll.left - (offset ? offset[0] : 0);
|
177
177
|
style.left = 'auto';
|
178
178
|
style.transform = '';
|
179
179
|
arrayStyle.right = "8px";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-table-virtual.d.ts","sourceRoot":"","sources":["use-table-virtual.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAWrD,UAAU,oBAAoB;IAC5B,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,KAAK,CAAC,SAA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oBAAoB;;;;;;;oBAuMpC,MAAM;mBACP,MAAM;WACd,MAAM;gBACD,MAAM;kBACJ,OAAO;;0BAnGuB,MAAM,UAAU,MAAM;0BAxBtB,MAAM,QAAQ,MAAM;2BA+JnB,MAAM,aAAa,MAAM,IAAI;qCAoBnB,MAAM;mCAWR,MAAM,GAAG,MAAM;CA2FnE,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
@@ -371,8 +371,10 @@ var useTableVirtual = function useTableVirtual(props) {
|
|
371
371
|
if (props.disabled) return;
|
372
372
|
if (context.heightCallback) {
|
373
373
|
var cb = context.heightCallback;
|
374
|
-
context.heightCallback = null;
|
375
374
|
cb();
|
375
|
+
setTimeout(function () {
|
376
|
+
context.heightCallback = null;
|
377
|
+
}, 300);
|
376
378
|
}
|
377
379
|
}, [scrollHeight]);
|
378
380
|
var finalRowsInView = rowsInView + context.rowSpanRows + context.autoAddRows;
|
@@ -154,7 +154,7 @@ export var usePositionStyle = function usePositionStyle(config) {
|
|
154
154
|
var overRight = 0;
|
155
155
|
var overLeft = 0;
|
156
156
|
if (h === 'left') {
|
157
|
-
style.left = rect.left - containerRect.left + containerScroll.left;
|
157
|
+
style.left = rect.left - containerRect.left + containerScroll.left - (offset ? offset[0] : 0);
|
158
158
|
style.transform = '';
|
159
159
|
arrayStyle.left = "8px";
|
160
160
|
if (adjust) {
|
@@ -164,7 +164,7 @@ export var usePositionStyle = function usePositionStyle(config) {
|
|
164
164
|
}
|
165
165
|
}
|
166
166
|
} else if (h === 'right') {
|
167
|
-
style.right = containerRect.right - rect.right + containerScrollBarWidth - containerScroll.left;
|
167
|
+
style.right = containerRect.right - rect.right + containerScrollBarWidth - containerScroll.left - (offset ? offset[0] : 0);
|
168
168
|
style.left = 'auto';
|
169
169
|
style.transform = '';
|
170
170
|
arrayStyle.right = "8px";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-table-virtual.d.ts","sourceRoot":"","sources":["use-table-virtual.tsx"],"names":[],"mappings":";AA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;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,iBAAiB,CAAC,GAAG,CAAC,EAAE,CAAC;IAClC,QAAQ,EAAE,CAAC,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,EAAE,CAAC;CAC3C;AACD,QAAA,MAAM,eAAe,UAAW,oBAAoB;;;;;;;oBAuMpC,MAAM;mBACP,MAAM;WACd,MAAM;gBACD,MAAM;kBACJ,OAAO;;0BAnGuB,MAAM,UAAU,MAAM;0BAxBtB,MAAM,QAAQ,MAAM;2BA+JnB,MAAM,aAAa,MAAM,IAAI;qCAoBnB,MAAM;mCAWR,MAAM,GAAG,MAAM;CA2FnE,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
@@ -365,8 +365,10 @@ var useTableVirtual = function useTableVirtual(props) {
|
|
365
365
|
if (props.disabled) return;
|
366
366
|
if (context.heightCallback) {
|
367
367
|
var cb = context.heightCallback;
|
368
|
-
context.heightCallback = null;
|
369
368
|
cb();
|
369
|
+
setTimeout(function () {
|
370
|
+
context.heightCallback = null;
|
371
|
+
}, 300);
|
370
372
|
}
|
371
373
|
}, [scrollHeight]);
|
372
374
|
var finalRowsInView = rowsInView + context.rowSpanRows + context.autoAddRows;
|