@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.js
CHANGED
|
@@ -13908,14 +13908,15 @@ function renderVirtual(style, id, columns, visibleDataRows, keptSelectedRows, fi
|
|
|
13908
13908
|
}, [style]);
|
|
13909
13909
|
const [fetchMoreInProgress, setFetchMoreInProgress] = useState28(false);
|
|
13910
13910
|
const { getScrollIndex, setScrollIndex } = useScrollStorage(id, persistScrollPosition);
|
|
13911
|
-
const
|
|
13911
|
+
const savedScrollIndex = getScrollIndex();
|
|
13912
13912
|
const topItemCount = stickyHeader ? tableHeadRows.length : 0;
|
|
13913
|
+
const virtuosoKey = !!savedScrollIndex && visibleDataRows.length > 0 ? "with-data" : "virtuoso";
|
|
13913
13914
|
return /* @__PURE__ */ jsx81(
|
|
13914
13915
|
Virtuoso2,
|
|
13915
13916
|
{
|
|
13916
13917
|
overscan: 5,
|
|
13917
13918
|
ref: virtuosoRef,
|
|
13918
|
-
...
|
|
13919
|
+
...savedScrollIndex !== void 0 ? { initialTopMostItemIndex: savedScrollIndex } : {},
|
|
13919
13920
|
components: {
|
|
13920
13921
|
// Applying a zIndex: 2 to ensure it stays on top of sticky columns
|
|
13921
13922
|
TopItemList: React13.forwardRef((props, ref) => /* @__PURE__ */ jsx81(
|
|
@@ -13955,7 +13956,7 @@ function renderVirtual(style, id, columns, visibleDataRows, keptSelectedRows, fi
|
|
|
13955
13956
|
rangeChanged: (newRange) => {
|
|
13956
13957
|
virtuosoRangeRef.current = newRange;
|
|
13957
13958
|
if (!infiniteScroll) {
|
|
13958
|
-
setScrollIndex(newRange.startIndex
|
|
13959
|
+
setScrollIndex(newRange.startIndex);
|
|
13959
13960
|
}
|
|
13960
13961
|
},
|
|
13961
13962
|
totalCount: tableHeadRows.length + (firstRowMessage ? 1 : 0) + visibleDataRows.length + keptSelectedRows.length,
|
|
@@ -13976,7 +13977,8 @@ function renderVirtual(style, id, columns, visibleDataRows, keptSelectedRows, fi
|
|
|
13976
13977
|
}
|
|
13977
13978
|
}
|
|
13978
13979
|
} : {}
|
|
13979
|
-
}
|
|
13980
|
+
},
|
|
13981
|
+
virtuosoKey
|
|
13980
13982
|
);
|
|
13981
13983
|
}
|
|
13982
13984
|
var VirtualRoot = memoizeOne(
|