From 025bea6ecaa991fb6e1316a6462b730281145a55 Mon Sep 17 00:00:00 2001 From: Giorgi Pirtskhalaishvili Date: Sun, 3 Sep 2023 02:43:45 +0400 Subject: [PATCH] fix the item being closed after swiping it twice --- src/SwipeableFlatList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SwipeableFlatList.tsx b/src/SwipeableFlatList.tsx index 7ba6929..c37afb1 100644 --- a/src/SwipeableFlatList.tsx +++ b/src/SwipeableFlatList.tsx @@ -22,7 +22,7 @@ const SwipeableFlatList = ({ if (!enableOpenMultipleRows) { if (typeof openedRowIndex.current === 'number') { const previousSwipeable = swipeableRefs.current[openedRowIndex.current]; - if (previousSwipeable) { + if (previousSwipeable && previousSwipeable !== swipeable) { previousSwipeable.close(); } }