Skip to content

Commit

Permalink
fix: fix item blink when scroll active
Browse files Browse the repository at this point in the history
  • Loading branch information
gxxgcn committed Dec 22, 2021
1 parent 4c5f414 commit 96c9b75
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ScrollViewGesture.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import Animated, {
useSharedValue,
withDecay,
withSpring,
withTiming,
} from 'react-native-reanimated';

type GestureContext = {
Expand Down Expand Up @@ -183,7 +184,9 @@ const IScrollViewGesture: React.FC<Props> = (props) => {
panTranslation = panTranslation * 0.5;
}

translation.value = ctx.panOffset + panTranslation;
translation.value = withTiming(ctx.panOffset + panTranslation, {
duration: 0,
});
},
onEnd: (e) => {
const { velocityX, velocityY, translationX, translationY } = e;
Expand Down

0 comments on commit 96c9b75

Please sign in to comment.