We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a98fc87 commit 1ac3d11Copy full SHA for 1ac3d11
1 file changed
src/components/DraggableFlatList.tsx
@@ -246,16 +246,16 @@ function DraggableFlatListInner<T>(props: DraggableFlatListProps<T>) {
246
}
247
248
},
249
- [isTouchActiveNative, onDragEnd]
+ [isTouchActiveNative, onDragEnd, onRelease]
250
);
251
252
useAnimatedReaction(
253
() => {
254
return spacerIndexAnim.value;
255
256
(cur, prev) => {
257
- if (cur !== prev && cur >= 0 && prev >= 0) {
258
- runOnJS(onPlaceholderIndexChange)(cur)
+ if (prev !== null && cur !== prev && cur >= 0 && prev >= 0) {
+ runOnJS(onPlaceholderIndexChange)(cur);
259
260
261
[spacerIndexAnim]
0 commit comments