@homebound/beam 2.415.0 → 2.415.2
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/dist/index.cjs +6 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -14267,14 +14267,15 @@ function renderVirtual(style, id, columns, visibleDataRows, keptSelectedRows, fi
|
|
|
14267
14267
|
}, [style]);
|
|
14268
14268
|
const [fetchMoreInProgress, setFetchMoreInProgress] = (0, import_react74.useState)(false);
|
|
14269
14269
|
const { getScrollIndex, setScrollIndex } = useScrollStorage(id, persistScrollPosition);
|
|
14270
|
-
const
|
|
14270
|
+
const savedScrollIndex = getScrollIndex();
|
|
14271
14271
|
const topItemCount = stickyHeader ? tableHeadRows.length : 0;
|
|
14272
|
+
const virtuosoKey = !!savedScrollIndex && visibleDataRows.length > 0 ? "with-data" : "virtuoso";
|
|
14272
14273
|
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
14273
14274
|
import_react_virtuoso2.Virtuoso,
|
|
14274
14275
|
{
|
|
14275
14276
|
overscan: 5,
|
|
14276
14277
|
ref: virtuosoRef,
|
|
14277
|
-
...
|
|
14278
|
+
...savedScrollIndex !== void 0 ? { initialTopMostItemIndex: savedScrollIndex } : {},
|
|
14278
14279
|
components: {
|
|
14279
14280
|
// Applying a zIndex: 2 to ensure it stays on top of sticky columns
|
|
14280
14281
|
TopItemList: import_react74.default.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
@@ -14314,7 +14315,7 @@ function renderVirtual(style, id, columns, visibleDataRows, keptSelectedRows, fi
|
|
|
14314
14315
|
rangeChanged: (newRange) => {
|
|
14315
14316
|
virtuosoRangeRef.current = newRange;
|
|
14316
14317
|
if (!infiniteScroll) {
|
|
14317
|
-
setScrollIndex(newRange.startIndex
|
|
14318
|
+
setScrollIndex(newRange.startIndex);
|
|
14318
14319
|
}
|
|
14319
14320
|
},
|
|
14320
14321
|
totalCount: tableHeadRows.length + (firstRowMessage ? 1 : 0) + visibleDataRows.length + keptSelectedRows.length,
|
|
@@ -14335,7 +14336,8 @@ function renderVirtual(style, id, columns, visibleDataRows, keptSelectedRows, fi
|
|
|
14335
14336
|
}
|
|
14336
14337
|
}
|
|
14337
14338
|
} : {}
|
|
14338
|
-
}
|
|
14339
|
+
},
|
|
14340
|
+
virtuosoKey
|
|
14339
14341
|
);
|
|
14340
14342
|
}
|
|
14341
14343
|
var VirtualRoot = (0, import_memoize_one.default)(
|