fix: prevent unnecessary scroll when not dragging in PagerList

This commit is contained in:
lawvs
2025-06-23 16:23:44 +08:00
parent fbe1de4e7d
commit 0a012dcd8d
@@ -49,6 +49,7 @@ export function PagerList({
ref={pagerRef}
initialPageIndex={initialPageIndex}
onScroll={(percent, direction, position) => {
if (!dragging) return
const progress = clamp(
percent * (direction === "left" ? -1 : direction === "right" ? 1 : 0) + position,
0,