-1

I am attempting to enable swiping on my list items in my React Native app, using SwipeListView from the react-native-swipe-list-view package.

  <View>
    <SwipeListView
      data={listData.filter((item) => typeof item['approved'] === "undefined")}
      renderItem={renderSwipeItem}
      keyExtractor={item => item.id.toString()}
      onRowDidOpen={(rowKey, rowMap) => {}}
      disableRightSwipe={false} // Disable right swipe to prevent accidental dismiss
      disableLeftSwipe={false} // Disable left swipe to prevent accidental dismiss
      renderHiddenItem={() => <></>} // No need for hidden buttons
      rightOpenValue={-75} // Set the value to trigger dismiss
      leftOpenValue={75} // Set the value to trigger dismiss
      onSwipeValueChange={handleSwipeValueChange}
    />
  </View>

I was able to set up the swiping of list items just fine. However, after swiping the first list item, I cannot scroll down through the list. I tried wrapping the above code in <ScrollView> tags from the React Native library and was able to fix the scrolling issue. However, I get the following error:

ERROR: VirtualizedLists should never be nested inside plain ScrollViews with the same orientation because it can break windowing and other functionality - use another VirtualizedList-backed container instead. 

How can I go about using SwipeListView and still be able to scroll? Or is there another VirtualizedList-backed container I should use instead of react-native-swipe-list-view?

JS_is_awesome18
  • 1,587
  • 7
  • 23
  • 67

1 Answers1

0

No you can not scroll FlatList up/down when the swipe hozirontal were active

famfamfam
  • 396
  • 3
  • 8
  • 31
  • Got it. I tried using ScrollView with the PanResponder utility to resolve the issue, but am running into another problem. I posted another question. Would you mind taking a look? https://stackoverflow.com/questions/76988809/scrolling-after-swiping-not-working-in-react-native-for-ios – JS_is_awesome18 Aug 28 '23 at 13:43