@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.
@@ -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
- const offsetOriginal = root.offsetLeft;
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
- const offsetOriginal = root.offsetLeft;
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
@@ -1,4 +1,4 @@
1
- /** @license UiReact v1.0.137
1
+ /** @license UiReact v1.0.138
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license UiReact v1.0.137
1
+ /** @license UiReact v1.0.138
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onesy/ui-react",
3
- "version": "1.0.138",
3
+ "version": "1.0.139",
4
4
  "description": "UI for React",
5
5
  "repository": "https://github.com/onesy-me/onesy.git",
6
6
  "author": "Lazar Erić <lazareric1@proton.me>",