From 8d9a45ab4bf91300376e657b183905a828c6d6da Mon Sep 17 00:00:00 2001 From: Ivan Tsai Date: Thu, 4 May 2023 00:07:23 +0800 Subject: [PATCH] fix: scrollThreshold is not properly applied in inverse mode. --- src/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.tsx b/src/index.tsx index 2782fbb..3e93ee1 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -268,7 +268,7 @@ export default class InfiniteScroll extends Component { return ( target.scrollTop <= - threshold.value / 100 + clientHeight - target.scrollHeight + 1 + clientHeight - (threshold.value / 100) * target.scrollHeight + 1 ); }