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