@tanstack/virtual-core
Advanced tools
Comparing version 3.1.3 to 3.2.0
@@ -69,2 +69,3 @@ export * from './utils.js'; | ||
scrollMargin?: number; | ||
gap?: number; | ||
scrollingDelay?: number; | ||
@@ -71,0 +72,0 @@ indexAttribute?: string; |
@@ -191,2 +191,3 @@ import { memo, notUndefined, approxEqual } from "./utils.js"; | ||
scrollMargin: 0, | ||
gap: 0, | ||
scrollingDelay: 150, | ||
@@ -335,3 +336,3 @@ indexAttribute: "data-index", | ||
const furthestMeasurement = this.options.lanes === 1 ? measurements[i - 1] : this.getFurthestMeasurement(measurements, i); | ||
const start = furthestMeasurement ? furthestMeasurement.end : paddingStart + scrollMargin; | ||
const start = furthestMeasurement ? furthestMeasurement.end + this.options.gap : paddingStart + scrollMargin; | ||
const measuredSize = itemSizeCache.get(key); | ||
@@ -338,0 +339,0 @@ const size = typeof measuredSize === "number" ? measuredSize : this.options.estimateSize(i); |
{ | ||
"name": "@tanstack/virtual-core", | ||
"version": "3.1.3", | ||
"version": "3.2.0", | ||
"description": "Headless UI for virtualizing scrollable elements in TS/JS + Frameworks", | ||
@@ -5,0 +5,0 @@ "author": "Tanner Linsley", |
@@ -269,2 +269,3 @@ import { approxEqual, memo, notUndefined } from './utils' | ||
scrollMargin?: number | ||
gap?: number | ||
scrollingDelay?: number | ||
@@ -352,2 +353,3 @@ indexAttribute?: string | ||
scrollMargin: 0, | ||
gap: 0, | ||
scrollingDelay: 150, | ||
@@ -541,3 +543,3 @@ indexAttribute: 'data-index', | ||
const start = furthestMeasurement | ||
? furthestMeasurement.end | ||
? furthestMeasurement.end + this.options.gap | ||
: paddingStart + scrollMargin | ||
@@ -544,0 +546,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
172214
2426