@expcat/tigercat-core 1.2.0 → 1.2.16
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 +3 -0
- package/dist/index.js +3 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -13567,6 +13567,9 @@ var virtualListContainerClasses = classNames(
|
|
|
13567
13567
|
);
|
|
13568
13568
|
var virtualListInnerClasses = "relative w-full";
|
|
13569
13569
|
function getFixedVirtualRange(scrollTop, containerHeight, itemHeight, itemCount, overscan) {
|
|
13570
|
+
if (itemHeight <= 0 || itemCount <= 0) {
|
|
13571
|
+
return { startIndex: 0, endIndex: -1, offsetTop: 0, totalHeight: 0 };
|
|
13572
|
+
}
|
|
13570
13573
|
const totalHeight = itemCount * itemHeight;
|
|
13571
13574
|
const startIndex = Math.max(0, Math.floor(scrollTop / itemHeight) - overscan);
|
|
13572
13575
|
const visibleCount = Math.ceil(containerHeight / itemHeight);
|
package/dist/index.js
CHANGED
|
@@ -11711,6 +11711,9 @@ var virtualListContainerClasses = classNames(
|
|
|
11711
11711
|
);
|
|
11712
11712
|
var virtualListInnerClasses = "relative w-full";
|
|
11713
11713
|
function getFixedVirtualRange(scrollTop, containerHeight, itemHeight, itemCount, overscan) {
|
|
11714
|
+
if (itemHeight <= 0 || itemCount <= 0) {
|
|
11715
|
+
return { startIndex: 0, endIndex: -1, offsetTop: 0, totalHeight: 0 };
|
|
11716
|
+
}
|
|
11714
11717
|
const totalHeight = itemCount * itemHeight;
|
|
11715
11718
|
const startIndex = Math.max(0, Math.floor(scrollTop / itemHeight) - overscan);
|
|
11716
11719
|
const visibleCount = Math.ceil(containerHeight / itemHeight);
|