@onesy/ui-react 1.0.138 → 1.0.139
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/TableCell/TableCell.js +5 -1
- package/esm/TableCell/TableCell.js +5 -1
- package/esm/index.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
package/TableCell/TableCell.js
CHANGED
|
@@ -216,9 +216,10 @@ const TableCell = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
216
216
|
_react.default.useEffect(() => {
|
|
217
217
|
if (sticky) {
|
|
218
218
|
if (root) {
|
|
219
|
+
let offsetOriginal = root.offsetLeft;
|
|
219
220
|
const parentOverflow = (0, _utils2.getOverflowParent)(root.parentElement, false);
|
|
220
221
|
root.style.position = 'unset';
|
|
221
|
-
|
|
222
|
+
offsetOriginal = root.offsetLeft;
|
|
222
223
|
root.style.position = 'sticky';
|
|
223
224
|
const method = () => {
|
|
224
225
|
const offsetNew = root.offsetLeft;
|
|
@@ -228,6 +229,9 @@ const TableCell = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
228
229
|
// initial
|
|
229
230
|
method();
|
|
230
231
|
setTimeout(() => {
|
|
232
|
+
root.style.position = 'unset';
|
|
233
|
+
offsetOriginal = root.offsetLeft;
|
|
234
|
+
root.style.position = 'sticky';
|
|
231
235
|
method();
|
|
232
236
|
}, 150);
|
|
233
237
|
if (parentOverflow) {
|
|
@@ -193,9 +193,10 @@ const TableCell = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
193
193
|
React.useEffect(() => {
|
|
194
194
|
if (sticky) {
|
|
195
195
|
if (root) {
|
|
196
|
+
let offsetOriginal = root.offsetLeft;
|
|
196
197
|
const parentOverflow = getOverflowParent(root.parentElement, false);
|
|
197
198
|
root.style.position = 'unset';
|
|
198
|
-
|
|
199
|
+
offsetOriginal = root.offsetLeft;
|
|
199
200
|
root.style.position = 'sticky';
|
|
200
201
|
const method = () => {
|
|
201
202
|
const offsetNew = root.offsetLeft;
|
|
@@ -205,6 +206,9 @@ const TableCell = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
205
206
|
// initial
|
|
206
207
|
method();
|
|
207
208
|
setTimeout(() => {
|
|
209
|
+
root.style.position = 'unset';
|
|
210
|
+
offsetOriginal = root.offsetLeft;
|
|
211
|
+
root.style.position = 'sticky';
|
|
208
212
|
method();
|
|
209
213
|
}, 150);
|
|
210
214
|
if (parentOverflow) {
|
package/esm/index.js
CHANGED
package/index.js
CHANGED