Skip to content

Commit 07f5392

Browse files
ericdolsonEric Olson
andauthored
Calling onRelease when user ends drag without moving their finger. (#445)
Co-authored-by: Eric Olson <[email protected]>
1 parent 37dd41a commit 07f5392

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/components/DraggableFlatList.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ function DraggableFlatListInner<T>(props: DraggableFlatListProps<T>) {
234234
if (cur !== prev && !cur) {
235235
const hasMoved = !!touchTranslate.value;
236236
if (!hasMoved && activeIndexAnim.value >= 0 && !disabled.value) {
237+
runOnJS(onRelease)(activeIndexAnim.value);
237238
runOnJS(onDragEnd)({
238239
from: activeIndexAnim.value,
239240
to: spacerIndexAnim.value,

0 commit comments

Comments
 (0)