Skip to content

Commit f03d814

Browse files
authored
fix(virtual-core): set useScrollendEvent default to false for bette… (#951)
1 parent 96f7202 commit f03d814

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.changeset/mighty-melons-admire.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@tanstack/virtual-core': patch
3+
---
4+
5+
fix(virtual-core): set `useScrollendEvent` default to false for bette…

docs/api/virtualizer.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ The implementation of this option is driven by the need for a reliable mechanism
248248
useScrollendEvent: boolean
249249
```
250250

251-
This option allows you to switch to use debounced fallback to reset the isScrolling instance property after `isScrollingResetDelay` milliseconds. The default value is `true`.
251+
Determines whether to use the native scrollend event to detect when scrolling has stopped. If set to false, a debounced fallback is used to reset the isScrolling instance property after isScrollingResetDelay milliseconds. The default value is `false`.
252252

253253
The implementation of this option is driven by the need for a reliable mechanism to handle scrolling behavior across different browsers. Until all browsers uniformly support the scrollEnd event.
254254

packages/virtual-core/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ export class Virtualizer<
438438
isScrollingResetDelay: 150,
439439
enabled: true,
440440
isRtl: false,
441-
useScrollendEvent: true,
441+
useScrollendEvent: false,
442442
useAnimationFrameWithResizeObserver: false,
443443
...opts,
444444
}

0 commit comments

Comments
 (0)